summaryrefslogtreecommitdiffstats
path: root/lib/SimpleSAML/Logger/LoggingHandlerSyslog.php
blob: 4ad3130a5b830d454eb390dad863c995752c0043 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

require_once('SimpleSAML/Configuration.php');
require_once('SimpleSAML/Logger.php');

class SimpleSAML_Logger_LoggingHandlerSyslog implements SimpleSAML_Logger_LoggingHandler {

    function __construct() {
        $config = SimpleSAML_Configuration::getInstance();
        assert($config instanceof SimpleSAML_Configuration);
        openlog("simpleSAMLphp", LOG_PID, $config->getValue('logging.facility') );
    }

    function log_internal($level,$string) {
        syslog($level,$level.' '.$string);
    }
}
?>