summaryrefslogtreecommitdiffstats
path: root/lib/SimpleSAML
diff options
context:
space:
mode:
authorJaime Perez Crespo <jaime.perez@uninett.no>2016-03-31 15:13:46 +0200
committerJaime Perez Crespo <jaime.perez@uninett.no>2016-03-31 15:13:46 +0200
commit13af37a440689e53f4adce42314f1858f827adda (patch)
tree7933bbe75d319b3825303e09cec8405d081eaf20 /lib/SimpleSAML
parent0e007fad1885dfd4a88604b597a991e7c1b23c2d (diff)
downloadsimplesamlphp-13af37a440689e53f4adce42314f1858f827adda.zip
simplesamlphp-13af37a440689e53f4adce42314f1858f827adda.tar.gz
simplesamlphp-13af37a440689e53f4adce42314f1858f827adda.tar.bz2
Allow passing as a parameter the logging handler to use in SimpleSAML\Logger::createLoggingHandler().
Diffstat (limited to 'lib/SimpleSAML')
-rw-r--r--lib/SimpleSAML/Logger.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/SimpleSAML/Logger.php b/lib/SimpleSAML/Logger.php
index 07a6fc4..76e328a 100644
--- a/lib/SimpleSAML/Logger.php
+++ b/lib/SimpleSAML/Logger.php
@@ -340,7 +340,7 @@ class Logger
}
}
- private static function createLoggingHandler()
+ private static function createLoggingHandler($handler = null)
{
// set to FALSE to indicate that it is being initialized
self::$loggingHandler = false;
@@ -350,7 +350,9 @@ class Logger
assert($config instanceof \SimpleSAML_Configuration);
// get the metadata handler option from the configuration
- $handler = $config->getString('logging.handler', 'syslog');
+ if (is_null($handler)) {
+ $handler = $config->getString('logging.handler', 'syslog');
+ }
// setting minimum log_level
self::$logLevel = $config->getInteger('logging.level', self::INFO);