Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benakamoorthi@fastmail.fm>2013-10-25 18:49:33 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2013-10-25 18:49:42 +0400
commit145fcb57614297bc9be5cbb9597c0820416640be (patch)
tree616e20edb4eb8665f67444c739347930789dbaf1 /core/Log.php
parent6d4d87e81984e68a7f792ea964e9464a9d984231 (diff)
Refs #4200 revised event docs for core/* files.
Diffstat (limited to 'core/Log.php')
-rw-r--r--core/Log.php52
1 files changed, 34 insertions, 18 deletions
diff --git a/core/Log.php b/core/Log.php
index 40ac327f54..fce940a6fc 100644
--- a/core/Log.php
+++ b/core/Log.php
@@ -310,16 +310,17 @@ class Log extends Singleton
*
* Logging writers must be associated by name in the array passed to event handlers.
*
- * Example handler:
- * ```
- * function (&$writers) {
- * $writers['myloggername'] = function ($level, $tag, $datetime, $message) {
- * ...
+ * ***Example**
+ *
+ * function (&$writers) {
+ * $writers['myloggername'] = function ($level, $tag, $datetime, $message) {
+ * // ...
+ * };
* }
- * }
*
- * // 'myloggername' can now be used in the log_writers config option.
- * ```
+ * // 'myloggername' can now be used in the log_writers config option.
+ *
+ * @param $
*/
Piwik::postEvent(self::GET_AVAILABLE_WRITERS_EVENT, array(&$writers));
@@ -340,9 +341,14 @@ class Log extends Singleton
* This event is called when trying to log an object to a file. Plugins can use
* this event to convert objects to strings before they are logged.
*
- * The $message parameter is the object that is being logged. Event handlers should
- * check if the object is of a certain type and if it is, set $message to the
- * string that should be logged.
+ * @param mixed &$message The object that is being logged. Event handlers should
+ * check if the object is of a certain type and if it is,
+ * set $message to the string that should be logged.
+ * @param int $level The log level used with this log entry.
+ * @param string $tag The current plugin that started logging (or if no plugin,
+ * the current class).
+ * @param string $datetime Datetime of the logging call.
+ * @param Log $logger The Log singleton.
*/
Piwik::postEvent(self::FORMAT_FILE_MESSAGE_EVENT, array(&$message, $level, $tag, $datetime, $logger));
}
@@ -381,12 +387,17 @@ class Log extends Singleton
* This event is called when trying to log an object to the screen. Plugins can use
* this event to convert objects to strings before they are logged.
*
- * The $message parameter is the object that is being logged. Event handlers should
- * check if the object is of a certain type and if it is, set $message to the
- * string that should be logged.
- *
* The result of this callback can be HTML so no sanitization is done on the result.
* This means YOU MUST SANITIZE THE MESSAGE YOURSELF if you use this event.
+ *
+ * @param mixed &$message The object that is being logged. Event handlers should
+ * check if the object is of a certain type and if it is,
+ * set $message to the string that should be logged.
+ * @param int $level The log level used with this log entry.
+ * @param string $tag The current plugin that started logging (or if no plugin,
+ * the current class).
+ * @param string $datetime Datetime of the logging call.
+ * @param Log $logger The Log singleton.
*/
Piwik::postEvent(self::FORMAT_SCREEN_MESSAGE_EVENT, array(&$message, $level, $tag, $datetime, $logger));
}
@@ -409,9 +420,14 @@ class Log extends Singleton
* This event is called when trying to log an object to a database table. Plugins can use
* this event to convert objects to strings before they are logged.
*
- * The $message parameter is the object that is being logged. Event handlers should
- * check if the object is of a certain type and if it is, set $message to the
- * string that should be logged.
+ * @param mixed &$message The object that is being logged. Event handlers should
+ * check if the object is of a certain type and if it is,
+ * set $message to the string that should be logged.
+ * @param int $level The log level used with this log entry.
+ * @param string $tag The current plugin that started logging (or if no plugin,
+ * the current class).
+ * @param string $datetime Datetime of the logging call.
+ * @param Log $logger The Log singleton.
*/
Piwik::postEvent(self::FORMAT_DATABASE_MESSAGE_EVENT, array(&$message, $level, $tag, $datetime, $logger));
}