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/LoggingProvider.php
2015-01-16 14:23:05 +01:00

24 lines
523 B
PHP

<?php
namespace ServiceProvider;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
use SimpleLogger\Logger;
use SimpleLogger\Syslog;
use SimpleLogger\File;
class LoggingProvider implements ServiceProviderInterface
{
public function register(Container $container)
{
$logger = new Logger;
$logger->setLogger(new Syslog('kanboard'));
if (DEBUG) {
$logger->setLogger(new File(__DIR__.'/../../data/debug.log'));
}
$container['logger'] = $logger;
}
}