Built for those poor souls (such as myself) that are stuck professionally with Laravel for the foreseeable future.


https://github.com/dev-this/laravel-console-logg
Zero dependency, no magic (ie. traits/magic methods/static calls), Logger output for your console commands. Leaves your usual application logging channels/drivers untouched
Please rate my code & implementation & repo, I’m always open to feedback and (constructive preferred) criticism – haven’t really released a package/repo before.
tl;dr: When running your ‘artisan’ commands (or serve), Laravel logger/PSR-3 output will also sent to the shell console stdout.
Considering Laravel’s command and web kernels both literally extend (and worsens?) Symfony components, I was (not really) surprised to find that it was not a simple task to setup Symfony Console Logger without violating your own principles.


Stackoverflow answerers try to convince you the only way is to write console-output specific code for your shared services, or change your default logging driver – both of which are not really great solutions (depending on your circumstances).
no comments yet
Be the first to share what you think!
Members
Online

source