This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
simplesamlphp/lib/SimpleSAML/Logger/LoggingHandlerSyslog.php

18 lines
521 B
PHP

<?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);
}
}
?>