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

25 lines
502 B
PHP
Raw Normal View History

2015-01-16 14:23:05 +01:00
<?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) {
2015-02-25 17:29:06 +01:00
$logger->setLogger(new File(DEBUG_FILE));
2015-01-16 14:23:05 +01:00
}
$container['logger'] = $logger;
}
}