thinkphp5.1 关闭日志log和日志设置
2022-07-28 14:14:58
121
{{single.collect_count}}

打开文件config\log.php

// +----------------------------------------------------------------------

// | 日志设置

// +----------------------------------------------------------------------

return [

// 日志记录方式,内置 file socket 支持扩展

'type' => 'File',

// 日志保存目录

'path' => '',

// 日志记录级别

/**

* 日志的级别从低到高依次为:debug, info, notice, warning, error, critical, alert, emergency,ThinkPHP额外增加了一个sql日志级别仅用于记录SQL日志(并且仅当开启数据库调试模式有效)

* debug:调试。

* info:信息

* notice:通知,注意

* warning:警告

* error:错误

* critical:危险的

* alert:弹出警告

* emergency:紧急情况,突发事件

* sql记录SQL日志

*/

'level' => ['warning','error','critical','alert','emergency','sql'],

// 单文件日志写入

'single' => false,

// 独立日志级别

'apart_level' => [],

// 最大日志文件数量

'max_files' => 0,

// 是否关闭日志写入

'close' => false,

];

关闭日志

'close' => true,

即可关闭日志

也可以设置日志级别level

sql日志,设置后,记录sql日志

3f92b5c569e29c3485656e83bb955225.png

回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}