Separation of logs in cli

This commit is contained in:
Juan Pablo Vial
2025-06-03 11:49:03 -04:00
parent 27031035ed
commit 300d966f3f

View File

@ -65,11 +65,18 @@ return [
},
'LoopLogger' => function(ContainerInterface $container) {
return new Monolog\Logger('loop', [
new Monolog\Handler\FilterHandler(
($container->has('ENVIRONMENT') and $container->get('ENVIRONMENT') === 'development')
? new Monolog\Handler\StreamHandler('/logs/loop-error.log')
: new Monolog\Handler\RotatingFileHandler('/logs/loop-error.log', 10),
Monolog\Level::Error
),
new Monolog\Handler\FilterHandler(
($container->has('ENVIRONMENT') and $container->get('ENVIRONMENT') === 'development')
? new Monolog\Handler\StreamHandler('/logs/loop.log')
: new Monolog\Handler\RotatingFileHandler('/logs/loop.log', 10),
Monolog\Level::Notice
Monolog\Level::Notice,
Monolog\Level::Warning
),
new Monolog\Handler\FilterHandler(
($container->has('ENVIRONMENT') and $container->get('ENVIRONMENT') === 'development')