修改日志记录方式
This commit is contained in:
@@ -94,10 +94,26 @@ return [
|
|||||||
* 日志记录
|
* 日志记录
|
||||||
*/
|
*/
|
||||||
'log' => [
|
'log' => [
|
||||||
/**
|
// 日志记录方式
|
||||||
* 错误日志
|
'type' => 'File',
|
||||||
*/
|
// 日志保存目录
|
||||||
'error_log' => runtime_path('catch/schedule') . 'schedule-error.log',
|
'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,
|
'schedule_kernel' => \catcher\library\ScheduleKernel::class,
|
||||||
|
@@ -268,14 +268,9 @@ class Master
|
|||||||
*/
|
*/
|
||||||
protected function initLog()
|
protected function initLog()
|
||||||
{
|
{
|
||||||
$log = config('log.channels.file');
|
|
||||||
|
|
||||||
$log['path'] = config('catch.schedule.store_path');
|
|
||||||
|
|
||||||
$channels = config('log.channels');
|
$channels = config('log.channels');
|
||||||
|
|
||||||
$channels['schedule'] = $log;
|
$channels['schedule'] = config('catch.schedule.log');;
|
||||||
|
|
||||||
|
|
||||||
config([
|
config([
|
||||||
'channels' => $channels,
|
'channels' => $channels,
|
||||||
|
Reference in New Issue
Block a user