Skip to content
Browser/javascript like console class for PHP
PHP JavaScript CSS
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
sniffs new Utility namespace. for ErrorLevel, FileStreamWrapper, PhpDoc, Use… Feb 13, 2020
src onBootstrap : redact $_SESSION; assertSetting() merge with default va… Feb 20, 2020
tests log session data Feb 17, 2020
.editorconfig firephp & chromeLogger plugins no longer output headers directly.. th… Sep 20, 2018
.eslintrc.json move .eslintrc.json to root Jan 30, 2020
.gitattributes conditionally require slevomat/coding-standard via composer's post-in… Feb 4, 2020
.gitignore Continue to modularize javascript Mar 8, 2019
.stylelintrc.json add & apply stylelint Jan 31, 2020
.travis.yml
LICENSE Create LICENSE Mar 1, 2018
README.md coding standards Jan 29, 2020
composer.json use post-update-cmd vs post-install-cmd Feb 4, 2020
phpcs.xml.dist refactor FileStreamWrapper.. generic wrapper can now be used to monke… Feb 11, 2020
phpunit.xml.dist Travis tweaks Aug 4, 2015

README.md

PHPDebugConsole

Browser/javascript like console class for PHP

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"
  • PSR-3 (Logger) Implementation
  • custom error handler
    • errors (even fatal) are captured / logged / displayed
    • send error notices via email (throttled as to not to send out a flood of emails)
  • password protected
  • send debug log via email

Screenshot of PHPDebugConsole's Output

Installation

This library requires PHP 5.4 (function array dereferencing, closure $this support) or later and has no userland dependencies.

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

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

Alternatively, download a release or clone this repository, then require src/Debug/Debug.php

See http://www.bradkent.com/php/debug for more information

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 a 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 Monolog\Handler\PsrHandler($debug->logger));
$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

No Dependencies Build Status SensioLabsInsight

Changelog

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

You can’t perform that action at this time.