From 9a6d31529273bf6029b6338c6d5af89a7ed78faf Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Thu, 4 Dec 2025 14:02:19 +0100 Subject: [PATCH 1/3] chore(config): remove unused logging options --- config/logging.php | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/config/logging.php b/config/logging.php index 77b897545..fe9d916b1 100644 --- a/config/logging.php +++ b/config/logging.php @@ -4,7 +4,6 @@ declare(strict_types=1); use Monolog\Handler\NullHandler; use Monolog\Handler\StreamHandler; -use Monolog\Handler\SyslogUdpHandler; use Monolog\Processor\PsrLogMessageProcessor; return [ @@ -73,27 +72,6 @@ return [ 'replace_placeholders' => true, ], - 'slack' => [ - 'driver' => 'slack', - 'url' => env('LOG_SLACK_WEBHOOK_URL'), - 'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'), - 'emoji' => env('LOG_SLACK_EMOJI', ':boom:'), - 'level' => env('LOG_LEVEL', 'critical'), - 'replace_placeholders' => true, - ], - - 'papertrail' => [ - 'driver' => 'monolog', - 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), - 'handler_with' => [ - 'host' => env('PAPERTRAIL_URL'), - 'port' => env('PAPERTRAIL_PORT'), - 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), - ], - 'processors' => [PsrLogMessageProcessor::class], - ], - 'stderr' => [ 'driver' => 'monolog', 'level' => env('LOG_LEVEL', 'debug'), @@ -105,19 +83,6 @@ return [ 'processors' => [PsrLogMessageProcessor::class], ], - 'syslog' => [ - 'driver' => 'syslog', - 'level' => env('LOG_LEVEL', 'debug'), - 'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER), - 'replace_placeholders' => true, - ], - - 'errorlog' => [ - 'driver' => 'errorlog', - 'level' => env('LOG_LEVEL', 'debug'), - 'replace_placeholders' => true, - ], - 'null' => [ 'driver' => 'monolog', 'handler' => NullHandler::class, From 0114ffac3eac5bfff6fbb13ec0115bede9c4d893 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Thu, 4 Dec 2025 14:26:46 +0100 Subject: [PATCH 2/3] 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 --- config/logging.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/logging.php b/config/logging.php index fe9d916b1..68c916474 100644 --- a/config/logging.php +++ b/config/logging.php @@ -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', From f4f9b2b97fad24b25605668f984d0a7ef5ce5002 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Thu, 4 Dec 2025 14:38:56 +0100 Subject: [PATCH 3/3] chore: improve .env.local.example - reorder the .env file, improve comment and remove some variables - use LOG_STACK=single for local development - additionally log deprecations for local development --- .env.local.example | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.env.local.example b/.env.local.example index d041aedb5..8cac0fbdd 100644 --- a/.env.local.example +++ b/.env.local.example @@ -1,22 +1,21 @@ +APP_NAME=Coolify APP_ENV=local APP_DEBUG=true -APP_NAME=Coolify APP_URL=http://localhost -APP_PORT=8000 -APP_FORCE_HTTPS=false APP_KEY= +LOG_STACK=single +LOG_DEPRECATIONS_CHANNEL=single + DB_DATABASE=coolify-db -DB_USERNAME=coolify -DB_PASSWORD=Password DB_HOST=host.docker.internal DB_PORT=5432 - -REDIS_PASSWORD=Password +DB_USERNAME=coolify +DB_PASSWORD=password RAY_ENABLED=true # RAY_PORT= -# Special Keys for Andras +# Special Keys for Andras & Peak BUNNY_API_KEY= BUNNY_STORAGE_API_KEY=