Keep Tokenview and Telegram running when log files are not writable.
Daily logs created by root cron were blocking www from appending, which aborted webhook ingest and bot pushes. File channels now use 0664 plus exception-safe stacks, and writes go through SafeLog. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+21
-3
@@ -45,8 +45,8 @@ return [
|
||||
| utilizes the Monolog PHP logging library, which includes a variety
|
||||
| of powerful log handlers and formatters that you're free to use.
|
||||
|
|
||||
| Available drivers: "single", "daily", "slack", "syslog",
|
||||
| "errorlog", "monolog", "custom", "stack"
|
||||
| Available drivers: "single", "daily", "slack", "syslog", "errorlog",
|
||||
| "monolog", "custom", "stack"
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -55,13 +55,14 @@ return [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['daily'],
|
||||
'ignore_exceptions' => false,
|
||||
'ignore_exceptions' => true,
|
||||
],
|
||||
|
||||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'permission' => 0664,
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
@@ -70,6 +71,7 @@ return [
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'days' => env('LOG_DAILY_DAYS', 14),
|
||||
'permission' => 0664,
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
@@ -123,24 +125,40 @@ return [
|
||||
'handler' => NullHandler::class,
|
||||
],
|
||||
|
||||
// File write failures (root vs www) must not abort Tokenview / Telegram.
|
||||
'tokenview' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['tokenview-file', 'stderr'],
|
||||
'ignore_exceptions' => true,
|
||||
],
|
||||
|
||||
'tokenview-file' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/tokenview/tokenview.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'days' => env('LOG_DAILY_DAYS', 14),
|
||||
'permission' => 0664,
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'telegram' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['telegram-file', 'stderr'],
|
||||
'ignore_exceptions' => true,
|
||||
],
|
||||
|
||||
'telegram-file' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/telegram/telegram.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'days' => env('LOG_DAILY_DAYS', 14),
|
||||
'permission' => 0664,
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'emergency' => [
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'permission' => 0664,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user