PHPackages                             vasek-purchart/console-errors-bundle - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. vasek-purchart/console-errors-bundle

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

vasek-purchart/console-errors-bundle
====================================

Logging of exceptions and error codes for Symfony Console

3.0.2(4y ago)4216.9k—8.3%3[1 issues](https://github.com/VasekPurchart/Console-Errors-Bundle/issues)[5 PRs](https://github.com/VasekPurchart/Console-Errors-Bundle/pulls)MITPHPPHP ~7.2

Since May 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/VasekPurchart/Console-Errors-Bundle)[ Packagist](https://packagist.org/packages/vasek-purchart/console-errors-bundle)[ RSS](/packages/vasek-purchart-console-errors-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (12)Versions (19)Used By (0)

Console Errors Bundle
=====================

[](#console-errors-bundle)

**Logging of exceptions and error codes for [Symfony Console](http://symfony.com/doc/current/components/console/introduction.html).**

This bundle ensures all uncaught exceptions and errors are logged in the same way as exceptions from controllers.

It also logs all command executions which ended with non-zero exit code.

Here is an example showing an exception, error and non-zero exit code: [![Error reports from Console](docs/console-errors.png)](docs/console-errors.png)

And these are corresponding log entries:

```
[2015-05-19 12:41:19] app.ERROR: Exception: Hello Exception! (uncaught exception) at /home/vasek/dev/projects/console-errors-bundle/framework-standard-edition/src/AppBundle/Console/HelloCommand.php line 23 while running console command `hello:world` {"exception":"[object] (Exception(code: 0): Hello Exception! at /home/vasek/dev/projects/console-errors-bundle/framework-standard-edition/src/AppBundle/Console/HelloCommand.php:23)"} []
[2015-05-19 12:41:58] app.ERROR: Symfony\Component\Debug\Exception\ContextErrorException: Notice: Undefined variable: foo (uncaught exception) at /home/vasek/dev/projects/console-errors-bundle/framework-standard-edition/src/AppBundle/Console/HelloCommand.php line 23 while running console command `hello:world` {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\ContextErrorException(code: 0): Notice: Undefined variable: foo at /home/vasek/dev/projects/console-errors-bundle/framework-standard-edition/src/AppBundle/Console/HelloCommand.php:23)"} []
[2015-05-19 12:42:13] app.ERROR: Command `hello:world` exited with status code 123 [] []

```

Configuration
-------------

[](#configuration)

Configuration structure with listed default values:

```
# config/packages/console_errors.yaml
console_errors:
    exceptions:
        # Enable logging for exceptions.
        enabled: true
        # Log level with which exceptions should be logged (accepts string or integer values).
        log_level: 'error'
        # Priority with which the listener will be registered.
        listener_priority: 0

    exit_code:
        # Enable logging for non-zero exit codes.
        enabled: true
        # Log level with which exit codes should be logged (accepts string or integer values).
        log_level: 'error'
        # Priority with which the listener will be registered.
        listener_priority: 0
```

Symfony by default always converts errors to PHP exceptions. Warnings and notices are converted by default only in development environment. If you want to configure your application to always convert warnings and notices to exceptions use the `debug.error_handler.throw_at` parameter (see [PHP manual](http://php.net/manual/en/errorfunc.constants.php) for other available values):

```
# config/packages/framework.yaml
parameters:
    debug.error_handler.throw_at: -1
```

You can also override services used internally, for example if you use a non standard logger, you can provide custom instance with an [alias](http://symfony.com/doc/current/components/dependency_injection/advanced.html#aliasing):

```
services:
    my_logger:
        class: 'Monolog\Logger'
        arguments:
            $name: 'my_channel'

    vasek_purchart.console_errors.console.logger: '@my_logger'
```

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

[](#installation)

Install package [`vasek-purchart/console-errors-bundle`](https://packagist.org/packages/vasek-purchart/console-errors-bundle) with [Composer](https://getcomposer.org/):

```
composer require vasek-purchart/console-errors-bundle
```

Register the bundle in your application:

```
// config/bundles.php
return [
	// ...
	VasekPurchart\ConsoleErrorsBundle\ConsoleErrorsBundle::class => ['all' => true],
];
```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 86.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~196 days

Recently: every ~454 days

Total

14

Last Release

1508d ago

Major Versions

0.5.1 → 1.02016-08-14

1.0 → 2.02017-05-10

1.0.1 → 3.02018-11-29

PHP version history (5 changes)0.1PHP ~5.5

0.3PHP ~5.5|~7.0

0.4PHP ~5.6|~7.0

2.0PHP ~7.0

3.0PHP ~7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/48831f7e09a459d6f2761d53922e26cef1579c030524f5c36f54964f0d6541e1?d=identicon)[VasekPurchart](/maintainers/VasekPurchart)

---

Top Contributors

[![VasekPurchart](https://avatars.githubusercontent.com/u/406821?v=4)](https://github.com/VasekPurchart "VasekPurchart (112 commits)")[![petrduda](https://avatars.githubusercontent.com/u/31613421?v=4)](https://github.com/petrduda "petrduda (16 commits)")[![Vrtak-CZ](https://avatars.githubusercontent.com/u/112567?v=4)](https://github.com/Vrtak-CZ "Vrtak-CZ (2 commits)")

---

Tags

consolesymfonybundleloggingdebugexceptionerror

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vasek-purchart-console-errors-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/vasek-purchart-console-errors-bundle/health.svg)](https://phpackages.com/packages/vasek-purchart-console-errors-bundle)
```

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
