recipes
recipes copied to clipboard
Switch default Monolog formatter to new Syslog formatter when@dev
After https://github.com/symfony/monolog-bundle/issues/441 is implemented, we can switch the dev.log
to it.
Why
Currently the log file in dev is just a bunch of text, it's almost unreadable because of how busy it is. With tool like https://lnav.org/, this changes because you can get features like syntax highlight, advanced filtering, display customizations etc without any configuration (Syslog is recognized by default), improving the current situation where you can do similar thing with Idealog, but with custom config, etc.
See a quick example how it could look like: https://github.com/Seldaek/monolog/pull/1689#issuecomment-1158141244
Note: colors in the video are configurable, I know @javiereguiluz had issues with them in Slack. :)
I like this idea 👍
I don't know if this change could "break" logs for some folks, but it'd be great to make this change (if possible) because having Symfony logs formatted by default in PhpStorm without installing or configuring anything would be amazing. Thanks!
I think it should be part of the recipe but I'd maybe leave it commented out as a hint, and default to text, because while it is a bit of a mess, it is the only true cross platform solution.
@Seldaek I'm :+1: with having a commented out formatter, easy enough to switch on and the feature is visible enough for those who want it, it might not be for everyone indeed.