PHPackages                             niels-nijens/enhances-console-logging - 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. niels-nijens/enhances-console-logging

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

niels-nijens/enhances-console-logging
=====================================

Components to enhance Symfony console &amp; stdout logging.

1.0.1(5y ago)02.2kMITPHPPHP ^7.2CI failing

Since Jul 23Pushed 5y ago1 watchersCompare

[ Source](https://github.com/niels-nijens/enhances-console-logging)[ Packagist](https://packagist.org/packages/niels-nijens/enhances-console-logging)[ RSS](/packages/niels-nijens-enhances-console-logging/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

enhances-console-logging
========================

[](#enhances-console-logging)

[![Latest version on Packagist](https://camo.githubusercontent.com/74d9eccc30d3f7328fb382c7f117d3da3761dc689cdf6fd2c64592537dc79392/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e69656c732d6e696a656e732f656e68616e6365732d636f6e736f6c652d6c6f6767696e67)](https://packagist.org/packages/niels-nijens/enhances-console-logging)[![Software License](https://camo.githubusercontent.com/b6d6e9c5306e2a99bde59f7f6c10ae0d0961fc0a0bfeac19eff504f0bcb069e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e69656c732d6e696a656e732f656e68616e6365732d636f6e736f6c652d6c6f6767696e67)](LICENSE)[![Build Status](https://camo.githubusercontent.com/bb5dd87aae08bf088a6c107a46a2da946b4ae764873041bff3816b9d7e369314/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e69656c732d6e696a656e732f656e68616e6365732d636f6e736f6c652d6c6f6767696e672f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/niels-nijens/enhances-console-logging/build-status/master)[![Coverage Status](https://camo.githubusercontent.com/8934715b4f5aa07b003e779e79ddf0dca031d80424667356ee23ea94f9861ed3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e69656c732d6e696a656e732f656e68616e6365732d636f6e736f6c652d6c6f6767696e672f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/niels-nijens/enhances-console-logging/build-status/master)[![Code Quality](https://camo.githubusercontent.com/4fefee4a6c30476d54cebd91799398e555f58852b6db011f112713203ca8861a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e69656c732d6e696a656e732f656e68616e6365732d636f6e736f6c652d6c6f6767696e672f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/niels-nijens/enhances-console-logging/build-status/master)

Components to enhance Symfony console &amp; stdout logging.

Installation using Composer
---------------------------

[](#installation-using-composer)

Run the following command to add the package to the composer.json of your project:

```
composer require niels-nijens/enhances-console-logging
```

Usage
-----

[](#usage)

### ProgressBarConsoleLogger

[](#progressbarconsolelogger)

The `ProgressBarConsoleLogger` allows you to log and show progress in a console without directly injecting a `ProgressBar` into your domain components handling the progression. Instead, you are able to inject logging into those components. This allows you to not only log to the console/stdout, but also to other logging mechanisms (eg. a file).

Logging to both a progress bar and another logging mechanism can be achieved by injecting/decorating an existing PSR-3 logger, like [Monolog](https://github.com/Seldaek/monolog).

The `ProgressBarConsoleLogger` adheres to the [PSR-3 logging specification](https://www.php-fig.org/psr/psr-3/) and as such implements the `Psr\Log\LoggerInterface`.

```
