summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--idiorm.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/idiorm.php b/idiorm.php
index 9fc1983..d643319 100644
--- a/idiorm.php
+++ b/idiorm.php
@@ -65,6 +65,7 @@
'driver_options' => null,
'identifier_quote_character' => null, // if this is null, will be autodetected
'logging' => false,
+ 'logger' => null,
'caching' => false,
'return_result_sets' => false,
);
@@ -407,6 +408,13 @@
self::$_last_query = $bound_query;
self::$_query_log[$connection_name][] = $bound_query;
+
+
+ if(is_callable(self::$_config[$connection_name]['logger'])){
+ $logger = $self::$_config[$connection_name]['logger'];
+ $logger($bound_query);
+ }
+
return true;
}