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