Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7159538
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
940 B
Referenced Files
None
Subscribers
None
View Options
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
Details
Attached
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)
Attached To
Mode
rCDRT CDRTool
Attached
Detach File
Event Timeline
Log In to Comment