forked from GNUsocial/gnu-social
Additional (optional, defaults to off) logging of PEAR error details, which allows database issues to be more easily diagnosed.
This commit is contained in:
parent
35677336de
commit
7279554681
@ -34,6 +34,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';
|
||||||
|
|
||||||
|
# Enables extra log information, for example full details of PEAR DB errors
|
||||||
|
#$config['site']['logdebug'] = true;
|
||||||
|
|
||||||
# This is a PEAR DB DSN, see http://pear.php.net/manual/en/package.database.db.intro-dsn.php
|
# This is a PEAR DB DSN, see http://pear.php.net/manual/en/package.database.db.intro-dsn.php
|
||||||
# Set it to match your actual database
|
# Set it to match your actual database
|
||||||
|
|
||||||
|
@ -43,7 +43,11 @@ function handleError($error)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
common_log(LOG_ERR, "PEAR error: " . $error->getMessage());
|
$logmsg = "PEAR error: " . $error->getMessage();
|
||||||
|
if(common_config('site', 'logdebug')) {
|
||||||
|
$logmsg .= " : ". $error->getDebugInfo();
|
||||||
|
}
|
||||||
|
common_log(LOG_ERR, $logmsg);
|
||||||
$msg = sprintf(_('The database for %s isn\'t responding correctly, '.
|
$msg = sprintf(_('The database for %s isn\'t responding correctly, '.
|
||||||
'so the site won\'t work properly. '.
|
'so the site won\'t work properly. '.
|
||||||
'The site admins probably know about the problem, '.
|
'The site admins probably know about the problem, '.
|
||||||
|
@ -73,6 +73,7 @@ $config =
|
|||||||
'theme' => 'default',
|
'theme' => 'default',
|
||||||
'path' => $_path,
|
'path' => $_path,
|
||||||
'logfile' => null,
|
'logfile' => null,
|
||||||
|
'logdebug' => false,
|
||||||
'fancy' => false,
|
'fancy' => false,
|
||||||
'locale_path' => INSTALLDIR.'/locale',
|
'locale_path' => INSTALLDIR.'/locale',
|
||||||
'language' => 'en_US',
|
'language' => 'en_US',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user