From d9adcfe6169c6c10059a670f2ed984908eb4e105 Mon Sep 17 00:00:00 2001 From: Christian Raue Date: Wed, 23 Jul 2014 20:27:56 +0200 Subject: removed lots of trailing whitespace --- core/Log.php | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'core/Log.php') diff --git a/core/Log.php b/core/Log.php index 3436497884..db3961923d 100644 --- a/core/Log.php +++ b/core/Log.php @@ -12,29 +12,29 @@ use Piwik\Db; /** * Logging utility class. - * + * * Log entries are made with a message and log level. The logging utility will tag each * log entry with the name of the plugin that's doing the logging. If no plugin is found, * the name of the current class is used. - * + * * You can log messages using one of the public static functions (eg, 'error', 'warning', * 'info', etc.). Messages logged with the **error** level will **always** be logged to * the screen, regardless of whether the [log] log_writer config option includes the * screen writer. * * Currently, Piwik supports the following logging backends: - * + * * - **screen**: logging to the screen * - **file**: logging to a file * - **database**: logging to Piwik's MySQL database * * ### Logging configuration - * + * * The logging utility can be configured by manipulating the INI config options in the * `[log]` section. - * + * * The following configuration options can be set: - * + * * - `log_writers[]`: This is an array of log writer IDs. The three log writers provided * by Piwik core are **file**, **screen** and **database**. You can * get more by installing plugins. The default value is **screen**. @@ -51,53 +51,53 @@ use Piwik\Db; * to log to or a path to a directory to store logs in. If a * directory, the file name is piwik.log. Can be relative to * Piwik's root dir or an absolute path. Defaults to **tmp/logs**. - * + * * ### Custom message formatting - * + * * If you'd like to format log messages differently for different backends, you can use * one of the `'Log.format...Message'` events. - * + * * These events are fired when an object is logged. You can create your own custom class * containing the information to log and listen to these events to format it correctly for * different backends. - * + * * If you don't care about the backend when formatting an object, implement a `__toString()` * in the custom class. - * + * * ### Custom log writers - * + * * New logging backends can be added via the {@hook Log.getAvailableWriters}` event. A log * writer is just a callback that accepts log entry information (such as the message, * level, etc.), so any backend could conceivably be used (including existing PSR3 * backends). - * + * * ### Examples - * + * * **Basic logging** - * + * * Log::error("This log message will end up on the screen and in a file.") * Log::verbose("This log message uses %s params, but %s will only be called if the" * . " configured log level includes %s.", "sprintf", "sprintf", "verbose"); - * + * * **Logging objects** - * + * * class MyDebugInfo * { * // ... - * + * * public function __toString() * { * return // ... * } * } - * + * * try { * $myThirdPartyServiceClient->doSomething(); * } catch (Exception $unexpectedError) { * $debugInfo = new MyDebugInfo($unexpectedError, $myThirdPartyServiceClient); * Log::debug($debugInfo); * } - * + * * @method static \Piwik\Log getInstance() */ class Log extends Singleton @@ -331,7 +331,7 @@ class Log extends Singleton * make new logging writers available. * * A logging writer is a callback with the following signature: - * + * * function (int $level, string $tag, string $datetime, string $message) * * `$level` is the log level to use, `$tag` is the log tag used, `$datetime` is the date time @@ -341,7 +341,7 @@ class Log extends Singleton * name specified can be used in Piwik's INI configuration. * * **Example** - * + * * public function getAvailableWriters(&$writers) { * $writers['myloggername'] = function ($level, $tag, $datetime, $message) { * // ... @@ -349,7 +349,7 @@ class Log extends Singleton * } * * // 'myloggername' can now be used in the log_writers config option. - * + * * @param array $writers Array mapping writer names with logging writers. */ Piwik::postEvent(self::GET_AVAILABLE_WRITERS_EVENT, array(&$writers)); -- cgit v1.2.3