nicecp/utildebug
Composer 安装命令:
composer require nicecp/utildebug
包简介
开发者在业务上主动触发用户级别的错误
README 文档
README
由程序员主动在业务上调用,触发Error Log,不同于fpm日志,此日志产生单独的文件,便于开发者查看及定位
需开启fpm错误日志,且UtilDebug日志将与
error_log在同一目录下,按日期自动归档日志
配置
// php.ini
display_errors = "On" // 开启fpm错误日志
error_log = /tmp/fpm.error.log // 路径
使用
<?php // 只适用于DAEMON进程,或者未重置请求上下文时有效 \UtilDebug\UtilDebug::getLastError(); // Config file name \UtilDebug\UtilDebug::config('app.log'); // Notice \UtilDebug\UtilDebug::notice("message"); \UtilDebug\UtilDebug::notice("message", new \Exception("Notice")); // Warning \UtilDebug\UtilDebug::warning("message"); \UtilDebug\UtilDebug::warning("message", new \Exception("Warning")); // Error \UtilDebug\UtilDebug::error("message"); \UtilDebug\UtilDebug::error("message", new \Exception("Error"));
统计信息
- 总下载量: 36
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-16