定时任务日志独立

This commit is contained in:
吴昊天 2023-02-23 18:34:28 +08:00
parent 4606091360
commit b6f5ecbf34
3 changed files with 4 additions and 4 deletions

View File

@ -148,7 +148,7 @@ class SystemCrontabListener implements ListenerInterface
$timer_log_open = config("log.timer_log", false);
if ($timer_log_open){
$date = date('Y-m-d H:i:s', time());
Log::info($date . $msg);
Log::write($date . $msg, 'crontab');
}
}

View File

@ -265,7 +265,7 @@ class SystemCrontabServices extends BaseServices
$timer_log_open = config("log.timer_log", false);
if ($timer_log_open) {
$date = date('Y-m-d H:i:s', time());
Log::info($date . $msg);
Log::write($date . $msg, 'crontab');
}
}
}

View File

@ -17,7 +17,7 @@ return [
// 默认日志记录通道
'default' => Env::get('log.channel', 'file'),
// 日志记录级别
'level' => ['error', 'warning', 'fail', 'success', 'info', 'notice'],
'level' => ['error', 'warning', 'fail', 'success', 'info', 'notice', 'crontab'],
// 日志类型记录的通道 ['error'=>'email',...]
'type_channel' => [],
//是否开启业务成功日志
@ -36,7 +36,7 @@ return [
// 单文件日志写入
'single' => false,
// 独立日志级别
'apart_level' => ['error', 'fail', 'success'],
'apart_level' => ['error', 'fail', 'success', 'crontab'],
// 最大日志文件数量
'max_files' => 60,
'time_format' => 'Y-m-d H:i:s',