修改日志记录方式

This commit is contained in:
root
2020-07-11 10:10:42 +08:00
parent 454e1fcd55
commit 42e75f50ff
2 changed files with 21 additions and 10 deletions

View File

@@ -94,10 +94,26 @@ return [
* 日志记录
*/
'log' => [
/**
* 错误日志
*/
'error_log' => runtime_path('catch/schedule') . 'schedule-error.log',
// 日志记录方式
'type' => 'File',
// 日志保存目录
'path' => runtime_path('catch/schedule'),
// 单文件日志写入
'single' => false,
// 独立日志级别
'apart_level' => [],
// 最大日志文件数量
'max_files' => 0,
// 使用JSON格式记录
'json' => false,
// 日志处理
'processor' => null,
// 关闭通道日志写入
'close' => false,
// 日志输出格式化
'format' => '[%s][%s] %s',
// 是否实时写入
'realtime_write' => false,
],
'schedule_kernel' => \catcher\library\ScheduleKernel::class,

View File

@@ -268,14 +268,9 @@ class Master
*/
protected function initLog()
{
$log = config('log.channels.file');
$log['path'] = config('catch.schedule.store_path');
$channels = config('log.channels');
$channels['schedule'] = $log;
$channels['schedule'] = config('catch.schedule.log');;
config([
'channels' => $channels,