We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit d80c553e authored by Zach Copley's avatar Zach Copley

Make logging facility configurable

parent 608a7ba7
......@@ -36,6 +36,9 @@ $config['site']['path'] = 'laconica';
// If you want logging sent to a file instead of syslog
// $config['site']['logfile'] = '/tmp/laconica.log';
// Change the syslog facility that Laconica logs to
// $config['syslog']['facility'] = LOG_LOCAL7;
// Enables extra log information, for example full details of PEAR DB errors
// $config['site']['logdebug'] = true;
......
......@@ -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'
......
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment