定制 bdk/debug 二次开发

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

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

bdk/debug

最新稳定版本:v3.5

Composer 安装命令:

composer require bdk/debug

包简介

Browser/javascript like console class for PHP

README 文档

README

Browser/javascript like console class for PHP

Log, Debug, Inspect

Website/Usage/Examples: http://www.bradkent.com/php/debug

  • PHP port of the javascript web console api
  • multiple simultaneous output options
    • ChromeLogger
    • FirePHP (no FirePHP dependency!)
    • HTML
    • Plain text / file
    • <script>
    • WebSocket (WAMP)
    • "plugin"
  • "Collectors" / wrappers for
    • Guzzle
    • Doctrine
    • Mysqli
    • PDO
    • PhpCurlClass
    • SimpleCache
    • SoapClient
    • SwiftMailer
    • more
  • PSR-3 (Logger) Implementation
  • PSR-15 (Middleware) Implementation
  • custom error handler
    • errors (even fatal) are captured / logged / displayed
    • optionally send error notices via email (throttled as to not to send out a flood of emails)
  • password protected
  • send debug log via email / Discord / Slack / MS Teams

Screenshot of PHPDebugConsole's Output

Installation

This library supports PHP 5.4 - 8.5

It is installable and autoloadable via Composer as bdk/debug.

{
    "require": {
        "bdk/debug": "^3.5",
    }
}

installation without Composer

As of v3.3 this is no longer officially supported due to now requiring one or more dependencies.

Usage

See http://www.bradkent.com/php/debug

PSR-3 Usage

PHPDebugConsole includes a PSR-3 implementation (which can be used as a monolog PSR handler). If you're using an application or library that uses these standards, drop PHPDebugConsole right in.

(this library includes neither psr/log or monolog/monolog. Include separately if needed.)

PSR-3:

// instantiate PHPDebugLogger / get instance
$debug = \bdk\Debug::getInstance();
$psr3logger = $debug->logger;
$psr3logger->emergency('fallen and can\'t get up');

monolog:

$monolog = new \Monolog\Logger('myApplication');
$monolog->pushHandler(new \bdk\Debug\Collector\MonologHandler($debug));
$monolog->critical('all your base are belong to them');

Methods

  • log
  • info
  • warn
  • error
  • assert
  • clear
  • count
  • countReset
  • group
  • groupCollapsed
  • groupEnd
  • profile
  • profileEnd
  • table
  • time
  • timeEnd
  • timeLog
  • trace
  • more

Tests / Quality

Supported PHP versions Build Status Maintainability Coverage

Changelog

http://www.bradkent.com/php/debug#changelog

统计信息

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

GitHub 信息

  • Stars: 80
  • Watchers: 6
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-25