mirror of
https://github.com/coollabsio/coolify.git
synced 2026-09-24 07:25:13 -05:00
chore(config): setup production logging
- use stderr in addition to the daily logging channel so the laravel logs are passed to the container logs (docker logs) - use the daily channel with local laravel.log to persist logs to disk for 10 days, ensuring a persistent copy even if the coolify container is removed/ updated - rotate the logs in production every 10 days and only log warnings, to prevent an excessively large laravel.log file - keep LOG_LEVEL=debug for the single channel as it will be used in development
This commit is contained in:
+4
-4
@@ -53,7 +53,7 @@ return [
|
||||
'channels' => [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => explode(',', (string) env('LOG_STACK', 'single')),
|
||||
'channels' => explode(',', (string) env('LOG_STACK', 'stderr,daily')),
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
|
||||
@@ -67,14 +67,14 @@ return [
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'days' => env('LOG_DAILY_DAYS', 14),
|
||||
'level' => env('LOG_LEVEL', 'warning'),
|
||||
'days' => env('LOG_DAILY_DAYS', 10),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'level' => env('LOG_LEVEL', 'warning'),
|
||||
'handler' => StreamHandler::class,
|
||||
'handler_with' => [
|
||||
'stream' => 'php://stderr',
|
||||
|
||||
Reference in New Issue
Block a user