This commit is contained in:
2025-06-06 18:18:31 +08:00
parent b5ac7e8f32
commit 7b4e41efc4
4 changed files with 771 additions and 98 deletions
+19 -14
View File
@@ -5,11 +5,16 @@
// +----------------------------------------------------------------------
return [
// 默认日志记录通道
'default' => env('log.channel', 'file'),
'default' => 'file',
// 日志记录级别
'level' => [],
// 日志类型记录的通道 ['error'=>'email',...]
'type_channel' => [],
'level' => ['error', 'warning', 'info', 'debug'],
// 日志类型记录的通道
'type_channel' => [
'error' => 'file',
'warning' => 'file',
'info' => 'file',
'debug' => 'file',
],
// 关闭全局日志写入
'close' => false,
// 全局日志处理 支持闭包
@@ -17,27 +22,27 @@ return [
// 日志通道列表
'channels' => [
'file' => [
'file' => [
// 日志记录方式
'type' => 'File',
// 日志保存目录
'path' => '',
'path' => runtime_path() . 'log',
// 单文件日志写入
'single' => false,
'single' => false,
// 独立日志级别
'apart_level' => [],
'apart_level' => ['error', 'warning', 'info', 'debug'],
// 最大日志文件数量
'max_files' => 0,
'max_files' => 30,
// 使用JSON格式记录
'json' => false,
'json' => false,
// 日志处理
'processor' => null,
'processor' => null,
// 关闭通道日志写入
'close' => false,
'close' => false,
// 日志输出格式化
'format' => '[%s][%s] %s',
'format' => '[%s][%s] %s',
// 是否实时写入
'realtime_write' => false,
'realtime_write' => true,
],
// 其它日志通道配置
],