File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ to write logs using the :phpfunction:`syslog` function:
154
154
.. code-block :: php
155
155
156
156
// config/packages/prod/monolog.php
157
+ use Psr\Log\LogLevel;
157
158
use Symfony\Config\MonologConfig;
158
159
159
160
return static function (MonologConfig $monolog) {
@@ -163,12 +164,12 @@ to write logs using the :phpfunction:`syslog` function:
163
164
// log to var/logs/(environment).log
164
165
->path('%kernel.logs_dir%/%kernel.environment%.log')
165
166
// log *all* messages (debug is lowest level)
166
- ->level('debug' );
167
+ ->level(LogLevel::DEBUG );
167
168
168
169
$monolog->handler('syslog_handler')
169
170
->type('syslog')
170
171
// log error-level messages and higher
171
- ->level('error' );
172
+ ->level(LogLevel::ERROR );
172
173
};
173
174
174
175
This defines a *stack * of handlers and each handler is called in the order that it's
You can’t perform that action at this time.
0 commit comments