This package is abandoned and no longer maintained. The author suggests using the maxime-pasquier/monolog-stdout-handler package instead.

A handler for Monolog that sends messages to stdout (with color).

1.2.1 2015-10-23 16:14 UTC

This package is auto-updated.

Last update: 2020-02-27 12:45:58 UTC


Latest Stable Version Build Status

Provides a handler for Monolog that sends colored messages to stdout. Messages may be uncolored with a provided formatter.

Loggers are able to interprete a balise language (like bbcode) Balises currently recognized are :

  • [c=<color>]...[/c] with color: black, blue, green, cyan, red, purple, yellow, white


How to use the stdout handler:

use Monolog\Logger;
use Monolog\Handler\StdoutHandler;

$stdoutHandler = new StdoutHandler();
$logger = new Logger('cronjob');

$logger->error('[c=green]Hello world![/c]');

How to remove the colored formatter:

use Monolog\Formatter\NoColorLineFormatter;
$stdoutHandler->setFormatter(new NoColorLineFormatter(StdoutHandler::FORMAT));