laravel - Unit test ignore log level -
i have log level defined in config/app.php emergency.
'log' => 'syslog', 'log_level' => env('log_level','warning'), throughout applications have log::info('info') in several places. meaning info should ignore because log level set emergency. works great when run application, problem when run unit tests phpunit. log level ignored logs everything.
anyone have idea why happen?
in versions of monolog (i'm not seeing on master branch now), monology outputs stderr when no handler set:
https://github.com/seldaek/monolog/blob/1.22.0/src/monolog/logger.php#l288-l290
pushing handler onto monolog, null one, supress logging:
https://github.com/seldaek/monolog/blob/master/src/monolog/handler/nullhandler.php
Comments
Post a Comment