Closed ffflabs closed 9 years ago
Hi @barbushin
I've made a PHP Console adapter for Slim Framework.
I was using Slim, then Slim-Monolog, then Monolog just to instantiate Monolog's PHPConsoleHandler to debug to PHPConsole.
It was cumbersome so I decided to remove the middle men and log directly to PHPConsole.
$logwriter = new \Amenadiel\SlimPHPConsole\PHPConsoleWriter(true); $app = new \Slim\Slim(array( 'log.enabled' => true, 'log.level' => \Slim\Log::DEBUG, 'log.writer' => $logwriter )); $app->log->debug('Debug called!');
it can be installed with composer:
composer require amenadiel/slim-phpconsole
I hope it might be useful to someone.
Thanks, Felipe! I've added link to your adapter in README.md https://github.com/barbushin/php-console/blob/master/README.md#slim-framework
:+1:
Hi @barbushin
I've made a PHP Console adapter for Slim Framework.
I was using Slim, then Slim-Monolog, then Monolog just to instantiate Monolog's PHPConsoleHandler to debug to PHPConsole.
It was cumbersome so I decided to remove the middle men and log directly to PHPConsole.
it can be installed with composer:
I hope it might be useful to someone.