mirror of
https://github.com/YunoHost-Apps/kanboard_ynh.git
synced 2024-09-03 19:36:17 +02:00
21 lines
563 B
PHP
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;
|
|
}
|
|
}
|