From b5db9e4098a45332c06f6ee4d61ad074293c441b Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Fri, 27 Jun 2008 06:55:11 +0000
Subject: [PATCH] Fix logging.facility usage of LOG_LOCAL5 in default
 configuration.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@719 44740490-163a-0410-bde0-09ae8108e29a
---
 config-templates/config.php | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/config-templates/config.php b/config-templates/config.php
index 1168641ea..8cad51e03 100644
--- a/config-templates/config.php
+++ b/config-templates/config.php
@@ -90,10 +90,20 @@ $config = array (
 	'logging.level'         => LOG_NOTICE,
 	'logging.handler'       => 'syslog',
 	'logging.processname'       => 'simpleSAMLphp',
-	/* Logging: syslog - Choose a syslog facility to use for logging.
+
+	/*
+	 * Choose which facility should be used when logging with syslog.
+	 *
+	 * These can be used for filtering the syslog output from simpleSAMLphp into its
+	 * own file by configuring the syslog daemon.
+	 *
+	 * See the documentation for openlog (http://php.net/manual/en/function.openlog.php) for available
+	 * facilities. Note that only LOG_USER is valid on windows.
+	 *
+	 * The default is to use LOG_LOCAL5 if available, and fall back to LOG_USER if not.
 	 */
-	'logging.facility'      => LOG_LOCAL5,
-	
+	'logging.facility' => (constant('LOG_LOCAL5') !== NULL) ? constant('LOG_LOCAL5') : LOG_USER,
+
 	/* Logging: file - Logfilename in the loggingdir from above.
 	 */
 	'logging.logfile'		=> 'simplesamlphp.log',
-- 
GitLab