From f2b9268a1f0cad32a72dea819336a6b2da04bdf4 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Wed, 6 Apr 2022 22:48:05 +0800 Subject: [PATCH] change swoole log path --- config/logging.php | 5 +++-- config/octane.php | 7 +++++++ include/constants.php | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/config/logging.php b/config/logging.php index 7f0a0fc5..c3415176 100644 --- a/config/logging.php +++ b/config/logging.php @@ -43,7 +43,8 @@ return [ 'single' => [ 'driver' => 'single', - 'path' => storage_path('logs/laravel.log'), + 'tap' => [\App\Logging\NexusFormatter::class], + 'path' => env('LOG_FILE', '/tmp/nexus.log'), 'level' => env('LOG_LEVEL', 'debug'), ], @@ -99,7 +100,7 @@ return [ ], 'emergency' => [ - 'path' => storage_path('logs/laravel.log'), + 'path' => env('LOG_FILE', '/tmp/nexus.log'), ], ], diff --git a/config/octane.php b/config/octane.php index 72b82d78..9344e23d 100644 --- a/config/octane.php +++ b/config/octane.php @@ -218,4 +218,11 @@ return [ 'max_execution_time' => 30, + 'swoole' => [ + 'options' => [ + 'log_file' => env('LOG_FILE', '/tmp/nexus.log'), + 'package_max_length' => 10 * 1024 * 1024, + ], + ], + ]; diff --git a/include/constants.php b/include/constants.php index 353adae1..46b1a4a0 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,6 +1,6 @@