配置指定日志记录目录

1/ config/logging.php 文件下 配置一个自定义

  

'cache' => [
'driver' => 'daily',
'path' => storage_path('logs/cache/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => 14,
]

执行时
Log::channel('cache')->info('1111111', ['123', 222]);
posted @ 2021-12-16 17:36  迷失在路上  阅读(90)  评论(0编辑  收藏  举报