aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/system_log.php27
-rw-r--r--version.php2
2 files changed, 24 insertions, 5 deletions
diff --git a/engine/lib/system_log.php b/engine/lib/system_log.php
index b500c573b..71996c8b3 100644
--- a/engine/lib/system_log.php
+++ b/engine/lib/system_log.php
@@ -257,6 +257,21 @@
return false;
return true;
+ }
+
+ /**
+ * Default system log handler, allows plugins to override, extend or disable logging.
+ *
+ * @param string $event
+ * @param string $object_type
+ * @param Loggable $object
+ * @return unknown
+ */
+ function system_log_default_logger($event, $object_type, $object)
+ {
+ system_log($object['object'], $object['event']);
+
+ return true;
}
/**
@@ -265,16 +280,20 @@
*
* @param String $event
* @param String $object_type
- * @param mixed $object
+ * @param Loggable $object
*/
function system_log_listener($event, $object_type, $object)
- {
- system_log($object, $event);
+ {
+ if (($object_type!='systemlog') && ($event!='log'))
+ trigger_elgg_event('log', 'systemlog', array('object' => $object, 'event' => $event));
return true;
}
/** Register event to listen to all events **/
- register_elgg_event_handler('all','all','system_log_listener', 400);
+ register_elgg_event_handler('all','all','system_log_listener', 400);
+
+ /** Register a default system log handler */
+ register_elgg_event_handler('log','systemlog','system_log_default_logger', 999);
?> \ No newline at end of file
diff --git a/version.php b/version.php
index aeb65575e..d799c0ab1 100644
--- a/version.php
+++ b/version.php
@@ -13,7 +13,7 @@
* @link http://elgg.org/
*/
- $version = 2009051101; // YYYYMMDD = Elgg Date
+ $version = 2009051102; // YYYYMMDD = Elgg Date
// XX = Interim incrementer
$release = '1.5'; // Human-friendly version name