summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-07-02 16:06:13 -0700
committerZach Copley <zach@controlyourself.ca>2009-07-02 16:06:13 -0700
commitd80c553e5f6e523de380d7c9dc0bbdb9d06cb45e (patch)
treefe5882932d9f1f17357c1603cdfe0fea33a5f793 /lib
parent608a7ba77c3db6174bd00ffd5ac7b71bfefbafd8 (diff)
Make logging facility configurable
Diffstat (limited to 'lib')
-rw-r--r--lib/common.php3
-rw-r--r--lib/util.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/common.php b/lib/common.php
index 5d451463b..14be747bc 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -124,7 +124,8 @@ $config =
'dupelimit' => 60), # default for same person saying the same thing
'syslog' =>
array('appname' => 'laconica', # for syslog
- 'priority' => 'debug'), # XXX: currently ignored
+ 'priority' => 'debug', # XXX: currently ignored
+ 'facility' => LOG_USER),
'queue' =>
array('enabled' => false,
'subsystem' => 'db', # default to database, or 'stomp'
diff --git a/lib/util.php b/lib/util.php
index 461ca15c1..d4d79afb3 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1098,7 +1098,8 @@ function common_ensure_syslog()
{
static $initialized = false;
if (!$initialized) {
- openlog(common_config('syslog', 'appname'), 0, LOG_USER);
+ openlog(common_config('syslog', 'appname'), 0,
+ common_config('syslog', 'facility'));
$initialized = true;
}
}