Commit ea3046ce by Carsten Brandt

Added note about logger component in bootstrap

fixes #4301
parent 0a5894fc
......@@ -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
---------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment