2FAuth/config/logging.php

136 lines
4.3 KiB
PHP
Raw Permalink Normal View History

2019-05-20 07:37:41 +02:00
<?php
use Monolog\Handler\NullHandler;
2019-05-20 07:37:41 +02:00
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
2023-08-01 11:26:58 +02:00
use Monolog\Processor\PsrLogMessageProcessor;
2019-05-20 07:37:41 +02:00
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
2024-06-26 13:50:12 +02:00
| This option defines the default log channel that is utilized to write
| messages to your logs. The value provided here should match one of
| the channels present in the list of "channels" configured below.
2019-05-20 07:37:41 +02:00
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
2021-12-02 13:15:53 +01:00
/*
|--------------------------------------------------------------------------
| Deprecations Log Channel
|--------------------------------------------------------------------------
|
| This option controls the log channel that should be used to log warnings
| regarding deprecated PHP and library features. This allows you to get
| your application ready for upcoming major versions of dependencies.
|
*/
2022-11-14 17:10:47 +01:00
'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
2024-06-26 13:50:12 +02:00
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
2022-11-14 17:10:47 +01:00
],
2021-12-02 13:15:53 +01:00
2019-05-20 07:37:41 +02:00
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
2024-06-26 13:50:12 +02:00
| Here you may configure the log channels for your application. Laravel
| utilizes the Monolog PHP logging library, which includes a variety
| of powerful log handlers and formatters that you're free to use.
2019-05-20 07:37:41 +02:00
|
2024-06-26 13:50:12 +02:00
| Available drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog", "custom", "stack"
2019-05-20 07:37:41 +02:00
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
2024-06-26 13:50:12 +02:00
'channels' => explode(',', env('LOG_STACK', 'daily')),
2019-05-20 07:37:41 +02:00
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
2021-12-02 13:15:53 +01:00
'level' => env('LOG_LEVEL', 'debug'),
2023-08-01 11:26:58 +02:00
'replace_placeholders' => true,
2019-05-20 07:37:41 +02:00
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
2021-12-02 13:15:53 +01:00
'level' => env('LOG_LEVEL', 'debug'),
2024-06-26 13:50:12 +02:00
'days' => env('LOG_DAILY_DAYS', 7),
2023-08-01 11:26:58 +02:00
'replace_placeholders' => true,
2019-05-20 07:37:41 +02:00
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
2024-06-26 13:50:12 +02:00
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
2021-12-02 13:15:53 +01:00
'level' => env('LOG_LEVEL', 'critical'),
2023-08-01 11:26:58 +02:00
'replace_placeholders' => true,
2019-05-20 07:37:41 +02:00
],
'papertrail' => [
'driver' => 'monolog',
2021-12-02 13:15:53 +01:00
'level' => env('LOG_LEVEL', 'debug'),
2022-11-14 17:10:47 +01:00
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
2019-05-20 07:37:41 +02:00
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
2022-11-14 17:10:47 +01:00
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
2019-05-20 07:37:41 +02:00
],
2023-08-01 11:26:58 +02:00
'processors' => [PsrLogMessageProcessor::class],
2019-05-20 07:37:41 +02:00
],
'stderr' => [
'driver' => 'monolog',
2021-12-02 13:15:53 +01:00
'level' => env('LOG_LEVEL', 'debug'),
2019-05-20 07:37:41 +02:00
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
2023-08-01 11:26:58 +02:00
'processors' => [PsrLogMessageProcessor::class],
2019-05-20 07:37:41 +02:00
],
'syslog' => [
'driver' => 'syslog',
2021-12-02 13:15:53 +01:00
'level' => env('LOG_LEVEL', 'debug'),
2024-06-26 13:50:12 +02:00
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
2023-08-01 11:26:58 +02:00
'replace_placeholders' => true,
2019-05-20 07:37:41 +02:00
],
'errorlog' => [
'driver' => 'errorlog',
2021-12-02 13:15:53 +01:00
'level' => env('LOG_LEVEL', 'debug'),
2023-08-01 11:26:58 +02:00
'replace_placeholders' => true,
2021-12-02 13:15:53 +01:00
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
2019-05-20 07:37:41 +02:00
],
'silent' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
2019-05-20 07:37:41 +02:00
],
];