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:
154154 .. code-block :: php
155155
156156 // config/packages/prod/monolog.php
157+ use Psr\Log\LogLevel;
157158 use Symfony\Config\MonologConfig;
158159
159160 return static function (MonologConfig $monolog) {
@@ -163,12 +164,12 @@ to write logs using the :phpfunction:`syslog` function:
163164 // log to var/logs/(environment).log
164165 ->path('%kernel.logs_dir%/%kernel.environment%.log')
165166 // log *all* messages (debug is lowest level)
166- ->level('debug' );
167+ ->level(LogLevel::DEBUG );
167168
168169 $monolog->handler('syslog_handler')
169170 ->type('syslog')
170171 // log error-level messages and higher
171- ->level('error' );
172+ ->level(LogLevel::ERROR );
172173 };
173174
174175 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