X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ddb7f33868ea499ab8f48a7062f145e8c0fbe02f..refs/pull/2227/head:/app/Config/logging.php diff --git a/app/Config/logging.php b/app/Config/logging.php index 0b55dc24d..afd56e482 100644 --- a/app/Config/logging.php +++ b/app/Config/logging.php @@ -1,5 +1,7 @@ 'debug', ], + // Custom errorlog implementation that logs out a plain, + // non-formatted message intended for the webserver log. + 'errorlog_plain_webserver' => [ + 'driver' => 'monolog', + 'level' => 'debug', + 'handler' => ErrorLogHandler::class, + 'handler_with' => [4], + 'formatter' => LineFormatter::class, + 'formatter_with' => [ + 'format' => "%message%", + ], + ], + 'null' => [ 'driver' => 'monolog', 'handler' => NullHandler::class, ], + + // Testing channel + // Uses a shared testing instance during tests + // so that logs can be checked against. + 'testing' => [ + 'driver' => 'testing', + ], + ], + + + // Failed Login Message + // Allows a configurable message to be logged when a login request fails. + 'failed_login' => [ + 'message' => env('LOG_FAILED_LOGIN_MESSAGE', null), + 'channel' => env('LOG_FAILED_LOGIN_CHANNEL', 'errorlog_plain_webserver'), ], ];