1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00
kanboard_ynh/sources/app/ServiceProvider/Logging.php
2014-12-22 19:15:38 +01:00

21 lines
563 B
PHP

<?php
namespace ServiceProvider;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogHandler;
class Logging implements ServiceProviderInterface
{
public function register(Container $container)
{
$logger = new Logger('app');
$logger->pushHandler(new StreamHandler(__DIR__.'/../../data/debug.log', Logger::DEBUG));
$logger->pushHandler(new SyslogHandler('kanboard', LOG_USER, Logger::DEBUG));
$container['logger'] = $logger;
}
}