PHPackages                             datravel/php-debug - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. datravel/php-debug

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

datravel/php-debug
==================

The Debug component provides tools to ease debugging PHP code.

2464PHP

Since May 31Pushed 9y ago6 watchersCompare

[ Source](https://github.com/datravel/php-debug)[ Packagist](https://packagist.org/packages/datravel/php-debug)[ RSS](/packages/datravel-php-debug/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

PHPDebug
========

[](#phpdebug)

PHPDebug is a [Monolog Cascade](https://github.com/theorchard/monolog-cascade) extension that which gives you the opportunity to handle and log errors of different levels.

---

Installation
------------

[](#installation)

Add PHPDebug as a requirement in your `composer.json` file or run

```
$ composer require datravel/php-debug
```

Usage
-----

[](#usage)

Then just use your logger as shown below

```
Cascade::fileConfig($config);
Log::info('Well, that works!');
Log::error('Maybe not...', ['some'=>'extra data']);
```

Configuring your loggers
------------------------

[](#configuring-your-loggers)

Monolog Cascade supports the following config formats:

- Yaml
- JSON
- Php array

### Configuration structure

[](#configuration-structure)

Here is a sample Php array config file:

```
