定制 callabra/debug 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

callabra/debug

最新稳定版本:v0.1.7

Composer 安装命令:

composer require callabra/debug

包简介

wrapper for debugging tools

README 文档

README

Wrapper for interacting for various debug and logging tools.

First add environmental variables defining which debug channels you would like to use.

SetEnv DEBUG_ERROR_CHANNELS FirePHP,File,Pushover
SetEnv DEBUG_WARNING_CHANNELS FirePHP
SetEnv DEBUG_INFO_CHANNELS FirePHP,File

Then call like so

\Debug\Log::error("message",$value);
\Debug\Log::warn("message",$value);
\Debug\Log::info("message",$value);

Each channel you defined in the environment variables will then output your data.

If you are using log files you will need to set the default path like this.

SetEnv DEBUG_FILE_PATH /var/www/logs/

Currently channels are as follows:

You can call each channel directly as well by calling the class directly instead of the Log class.

For example...

\Debug\File::error("message",$value);

\Debug\FirePHP::error("message",$value);

Calling the channel directly still requires the channel to be present in the environmental channels variable (DEBUG_ERROR_CHANNELS, etc). This allows you to use one channel for development without the need to remove the calls when pushing to production. (e.g. Call FirePHP directly and know it will do nothing in production because that isn't an allowed channel in that environment)

统计信息

  • 总下载量: 4.9k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-27