summaryrefslogtreecommitdiff
path: root/app/ServiceProvider/LoggingProvider.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2015-01-02 17:19:13 -0500
committerFrédéric Guillot <fred@kanboard.net>2015-01-02 17:19:13 -0500
commit3076ba22dd8346725b4e1ad757532c00df5b18d9 (patch)
treee893c113c34d86c5dc923953754dc68c4b1d842d /app/ServiceProvider/LoggingProvider.php
parentc32567857db9bb1a6dfa339f58d817c97f64db11 (diff)
Fix bugs, improve perfs and use SimpleLogger instead of Monolog
Diffstat (limited to 'app/ServiceProvider/LoggingProvider.php')
-rw-r--r--app/ServiceProvider/LoggingProvider.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/ServiceProvider/LoggingProvider.php b/app/ServiceProvider/LoggingProvider.php
index f5e70381..5b2cf565 100644
--- a/app/ServiceProvider/LoggingProvider.php
+++ b/app/ServiceProvider/LoggingProvider.php
@@ -4,19 +4,19 @@ namespace ServiceProvider;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
-use Monolog\Logger;
-use Monolog\Handler\StreamHandler;
-use Monolog\Handler\SyslogHandler;
+use SimpleLogger\Logger;
+use SimpleLogger\Syslog;
+use SimpleLogger\File;
class LoggingProvider implements ServiceProviderInterface
{
public function register(Container $container)
{
- $logger = new Logger('app');
- $logger->pushHandler(new SyslogHandler('kanboard', LOG_USER, Logger::INFO));
+ $logger = new Logger;
+ $logger->setLogger(new Syslog('kanboard'));
if (DEBUG) {
- $logger->pushHandler(new StreamHandler(__DIR__.'/../../data/debug.log', Logger::DEBUG));
+ $logger->setLogger(new File(__DIR__.'/../../data/debug.log'));
}
$container['logger'] = $logger;