coolify/config/logging.php

96 lines
3 KiB
PHP
Raw Normal View History

2023-03-17 14:33:48 +00:00
<?php
2025-03-29 15:20:45 +00:00
declare(strict_types=1);
2023-03-17 14:33:48 +00:00
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
2025-11-30 15:50:04 +00:00
use Monolog\Processor\PsrLogMessageProcessor;
2023-03-17 14:33:48 +00:00
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
2025-11-30 15:50:04 +00: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.
2023-03-17 14:33:48 +00:00
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| 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.
|
*/
'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
2025-11-30 15:50:04 +00:00
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
2023-03-17 14:33:48 +00:00
],
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
2025-11-30 15:50:04 +00: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.
2023-03-17 14:33:48 +00:00
|
2025-11-30 15:50:04 +00:00
| Available drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog", "custom", "stack"
2023-03-17 14:33:48 +00:00
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => explode(',', (string) env('LOG_STACK', 'stderr,daily')),
2023-03-17 14:33:48 +00:00
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
2025-11-30 15:50:04 +00:00
'replace_placeholders' => true,
2023-03-17 14:33:48 +00:00
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'warning'),
'days' => env('LOG_DAILY_DAYS', 10),
2025-11-30 15:50:04 +00:00
'replace_placeholders' => true,
2023-03-17 14:33:48 +00:00
],
'stderr' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'warning'),
2023-03-17 14:33:48 +00:00
'handler' => StreamHandler::class,
'handler_with' => [
2023-03-17 14:33:48 +00:00
'stream' => 'php://stderr',
],
'formatter' => env('LOG_STDERR_FORMATTER'),
2025-11-30 15:50:04 +00:00
'processors' => [PsrLogMessageProcessor::class],
2023-03-17 14:33:48 +00:00
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];