How is logging configured in Lumen 5.6? Namely, I want to set up Monolog to send logs to stderr.
For context, I'm seeking to configure logging so it works correctly on Heroku, as described here.
It looks like instructions along these lines worked up to Lumen 5.5, but there is no longer a configureMonologUsing method which one can call.
The Lumen 5.6 docs direct you to look at the Laravel docs, whereas in Lumen 5.5 there was substantive documentation about logging.
The Laravel docs suggest editing the config/logging.php file, but there is no such file in a Lumen installation.
Thanks 鉂わ笍 I realise I'm probably missing something obvious!
@timrogers
all the configuration of lumen as well as logging locate on (project_name)/vendor/laravel/lumen-framework/config
NOTE:
if you change some details ,please remember to check it after composer update, if you need reoverride your settings again.
Thanks @lukylook. I also found that adding a config/logging.php which looks like the file bundled in Lumen also works.
@lukylook
Did you manage to log to different channels?
Log::channel('single')->info('message');
..this just gives me an error
_Call to undefined method Monolog\Logger::channel()_
Most helpful comment
Thanks @lukylook. I also found that adding a
config/logging.phpwhich looks like the file bundled in Lumen also works.