Browse Source

Added note about logger component in bootstrap

fixes #4301
tags/2.0.0-rc
Carsten Brandt 10 years ago
parent
commit
ea3046cedc
  1. 4
      docs/guide/runtime-logging.md

4
docs/guide/runtime-logging.md

@ -45,6 +45,7 @@ You may configure the targets in application configuration, like the following:
```php
[
'bootstrap' => ['log'], // ensure logger gets loaded before application starts
'components' => [
'log' => [
'targets' => [
@ -80,6 +81,9 @@ Yii::$app->log->targets['file']->enabled = false;
When the application ends or [[yii\log\Logger::flushInterval|flushInterval]] is reached, Logger will call
[[yii\log\Logger::flush()|flush()]] to send logged messages to different log targets, such as file, email, web.
> Note: In the above confiuration we added the log component to the list of [bootstrap](runtime-bootstrapping.md) components that
get initialized when the application is initialized to ensure logging is enabled from the start.
Profiling
---------

Loading…
Cancel
Save