webman日志插件

v1.0.2
版本
2022-06-21
版本更新时间
109
安装
2
star
简介
将每个请求记录到日志,包括客户端ip,方法、地址、POST数据、SQL等。
注意
不能与webman/arms 插件同时使用
安装
composer require webman/log
使用
安装后自动生成日志,日志记录在rutime/logs
下
效果类似
[2022-06-02 20:15:11] default.INFO: 8.8.8.8 GET webman.com/user/get [0.073ms] [webman/log]
[SQL] SELECT * FROM `user` WHERE `uid` = 11 LIMIT 1 [ RunTime:0.000891s ]
[SQL] SELECT * FROM `user` WHERE `uid` = 11 LIMIT 1 [ RunTime:0.000797s ]
[SQL] SELECT * FROM `user` WHERE `uid` = 11 LIMIT 1 [ RunTime:0.000797s ]
[SQL] SELECT * FROM `user` WHERE `uid` = 11 LIMIT 1 [ RunTime:0.000797s ]
注意
illuminate/database
日志需要安装 composer require illuminate/events
。
如果thinkorm
无法产生日志,请手动设置 config/thinkorm.php
中 trigger_sql
为 true
。
卸载webman/log
时记得将trigger_sql
为 false
。