Page MenuHomePhabricator

No OneTemporary

diff --git a/phplib/logger.php b/phplib/logger.php
index f833d63..629ed23 100644
--- a/phplib/logger.php
+++ b/phplib/logger.php
@@ -1,29 +1,35 @@
<?php
require 'Monolog/autoload.php';
use Monolog\Logger;
use Monolog\Handler\SyslogHandler;
+use Monolog\Handler\BrowserConsoleHandler;
use Monolog\Formatter\LineFormatter;
global $logger;
$logger = new Logger('WEB');
$syslog = new SyslogHandler('cdrtool', 'local0');
$formatter = new LineFormatter("%channel%: %message% %extra%");
$syslog->setFormatter($formatter);
$logger->pushHandler($syslog);
+global $browserLogger;
+$browserLogger = new Logger('CDRTool');
+$console= new BrowserConsoleHandler();
+$browserLogger->pushHandler($console);
+
function logger($message, $level = 'notice')
{
global $logger;
if ($level == 'notice') {
notice($message);
}
}
function notice($message)
{
global $logger;
$logger->notice($message);
}

File Metadata

Mime Type
text/x-diff
Expires
Sat, Nov 23, 6:51 AM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3408962
Default Alt Text
(940 B)

Event Timeline