We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
版本:
"php": ">=8.0.0", "topthink/framework": "^8.0",
日志配置文件:
<?php // +---------------------------------------------------------------------- // | 日志设置 // +---------------------------------------------------------------------- return [ // 默认日志记录通道 'default' => 'file', // 日志记录级别 'level' => ['wechat', 'sys', 'sql'], // 日志类型记录的通道 ['error'=>'email',...] 'type_channel' => [ 'wechat' => 'wechat', 'sys' => 'sys', 'sql' => 'sql', ], // 关闭全局日志写入 'close' => false, // 日志通道列表 'channels' => [ 'file' => [ // 日志记录方式 'type' => 'File', // 日志保存目录 'path' => public_path() . "Logs/main", // 单文件日志写入 'single' => true, // 独立日志级别 'apart_level' => [], // 最大日志文件数量 'max_files' => 50, // 单个日志文件大小 'file_size' => 1024*1024*10, // 使用JSON格式记录 'json' => true, ], // 其它日志通道配置 // 微信日志 'wechat' => [ // 日志记录方式 'type' => 'File', // 日志保存目录 'path' => public_path() . "Logs/wechat", // 单文件日志写入 'single' => true, // 独立日志级别 'apart_level' => [], // 最大日志文件数量 'max_files' => 50, // 单个日志文件大小 'file_size' => 1024*1024*10, // 使用JSON格式记录 'json' => true, // 日志处理 'processor' => null, // 关闭通道日志写入 'close' => false, // 时间格式化 'time_format' => 'Y-m-d H:i:s', // 日志输出格式化 'format' => '[%s][%s] %s', // 是否实时写入 'realtime_write' => true, ], // 系统日志 'sys' => [ // 日志记录方式 'type' => 'File', // 日志保存目录 'path' => public_path() . "Logs/sys", // 单文件日志写入 'single' => true, // 独立日志级别 'apart_level' => [], // 最大日志文件数量 'max_files' => 50, // 单个日志文件大小 'file_size' => 1024*1024*10, // 使用JSON格式记录 'json' => true, // 日志处理 'processor' => null, // 关闭通道日志写入 'close' => false, // 时间格式化 'time_format' => 'Y-m-d H:i:s', // 日志输出格式化 'format' => '[%s][%s] %s', // 是否实时写入 'realtime_write' => true, ], // 数据库日志 'sql' => [ // 日志记录方式 'type' => 'File', // 日志保存目录 'path' => public_path() . "Logs/sql", // 单文件日志写入 'single' => true, // 独立日志级别 'apart_level' => [], // 最大日志文件数量 'max_files' => 50, // 单个日志文件大小 'file_size' => 1024*1024*10, // 使用JSON格式记录 'json' => true, // 日志处理 'processor' => null, // 关闭通道日志写入 'close' => false, // 时间格式化 'time_format' => 'Y-m-d H:i:s', // 日志输出格式化 'format' => '[%s][%s] %s', // 是否实时写入 'realtime_write' => true, ], ], ];
使用Log::getLog()获取为空 使用Log::getLog('wechat')也是空的 请问是我哪里配置有问题吗?
The text was updated successfully, but these errors were encountered:
测试正常
Log::debug('debug message'); halt(Log::getLog());
Sorry, something went wrong.
No branches or pull requests
版本:
日志配置文件:
使用Log::getLog()获取为空
使用Log::getLog('wechat')也是空的
请问是我哪里配置有问题吗?
The text was updated successfully, but these errors were encountered: