Laravel log channel 分组配置

阅读 79

2022-06-28

use Illuminate\Support\Facades\Log;

Log::channel('vehicle')->info('==xxx任务开始==');

config/logging.php


channels配置项中添加

'channels' => [
// ...
'vehicle' => [
'driver' => 'daily',
'path' => storage_path('logs/vehicle/off_shelf.log'),
'level' => 'info',
'days' => 7
],
// ...
]

vendor/laravel/framework/src/Illuminate/Log/LogManager.php

Laravel log channel 分组配置_配置项

 


精彩评论(0)

0 0 举报