forked from GNUsocial/gnu-social
Make logging facility configurable
This commit is contained in:
parent
608a7ba77c
commit
d80c553e5f
@ -36,6 +36,9 @@ $config['site']['path'] = 'laconica';
|
|||||||
// If you want logging sent to a file instead of syslog
|
// If you want logging sent to a file instead of syslog
|
||||||
// $config['site']['logfile'] = '/tmp/laconica.log';
|
// $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
|
// Enables extra log information, for example full details of PEAR DB errors
|
||||||
// $config['site']['logdebug'] = true;
|
// $config['site']['logdebug'] = true;
|
||||||
|
|
||||||
|
@ -124,7 +124,8 @@ $config =
|
|||||||
'dupelimit' => 60), # default for same person saying the same thing
|
'dupelimit' => 60), # default for same person saying the same thing
|
||||||
'syslog' =>
|
'syslog' =>
|
||||||
array('appname' => 'laconica', # for syslog
|
array('appname' => 'laconica', # for syslog
|
||||||
'priority' => 'debug'), # XXX: currently ignored
|
'priority' => 'debug', # XXX: currently ignored
|
||||||
|
'facility' => LOG_USER),
|
||||||
'queue' =>
|
'queue' =>
|
||||||
array('enabled' => false,
|
array('enabled' => false,
|
||||||
'subsystem' => 'db', # default to database, or 'stomp'
|
'subsystem' => 'db', # default to database, or 'stomp'
|
||||||
|
@ -1098,7 +1098,8 @@ function common_ensure_syslog()
|
|||||||
{
|
{
|
||||||
static $initialized = false;
|
static $initialized = false;
|
||||||
if (!$initialized) {
|
if (!$initialized) {
|
||||||
openlog(common_config('syslog', 'appname'), 0, LOG_USER);
|
openlog(common_config('syslog', 'appname'), 0,
|
||||||
|
common_config('syslog', 'facility'));
|
||||||
$initialized = true;
|
$initialized = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user