refactor: 修改日志配置

This commit is contained in:
2025-04-09 16:09:55 +08:00
parent 81b9bbf120
commit 9d36e5e5d1
3 changed files with 115 additions and 25 deletions

View File

@@ -4,11 +4,9 @@
// | 日志设置
// +----------------------------------------------------------------------
use think\facade\Log;
return [
// 默认日志记录通道
'default' => 'MyFileLogger',
'default' => 'file',
// 日志记录级别
'level' => [],
// 日志类型记录的通道 ['error'=>'email',...]
@@ -42,28 +40,6 @@ return [
// 是否实时写入
'realtime_write' => false,
],
'MyFileLogger' => [
// 日志记录方式
'type' => \app\admin\driver\Logger::class,
// 日志保存目录
'path' => '',
// 单文件日志写入
'single' => false,
// 独立日志级别
'apart_level' => [],
// 最大日志文件数量
'max_files' => 0,
// 使用JSON格式记录
'json' => false,
// 日志处理
'processor' => null,
// 关闭通道日志写入
'close' => false,
// 日志输出格式化
'format' => '[%s][%s][%s] %s',
// 是否实时写入
'realtime_write' => false,
]
// 其它日志通道配置
],