Remove color markers when logging to files (#13541)

* Remove color markers when logging to files

* Update lint

* safety checks

* back to simple formatters, but two of them

* more correct comment
This commit is contained in:
Tony Murray
2021-11-24 16:33:02 -06:00
committed by GitHub
parent 21edc086ca
commit b94f08cfdb
4 changed files with 68 additions and 23 deletions

View File

@@ -64,12 +64,14 @@ return [
'single' => [
'driver' => 'single',
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
'formatter' => \App\Logging\NoColorFormatter::class,
'level' => env('LOG_LEVEL', 'error'),
],
'daily' => [
'driver' => 'daily',
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
'formatter' => \App\Logging\NoColorFormatter::class,
'level' => env('LOG_LEVEL', 'error'),
'days' => 14,
],
@@ -95,7 +97,7 @@ return [
'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => \LibreNMS\Util\CliColorFormatter::class,
'formatter' => \App\Logging\CliColorFormatter::class,
'with' => [
'stream' => 'php://stderr',
],
@@ -105,7 +107,7 @@ return [
'stdout_debug' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => \LibreNMS\Util\CliColorFormatter::class,
'formatter' => \App\Logging\CliColorFormatter::class,
'with' => [
'stream' => 'php://output',
],
@@ -115,7 +117,7 @@ return [
'stdout' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => \LibreNMS\Util\CliColorFormatter::class,
'formatter' => \App\Logging\CliColorFormatter::class,
'with' => [
'stream' => 'php://output',
],