diff options
author | CiaranG <ciaran@ciarang.com> | 2009-03-04 00:23:34 +0000 |
---|---|---|
committer | CiaranG <ciaran@ciarang.com> | 2009-03-04 00:23:34 +0000 |
commit | 7279554681da728deb74a87230de3a1021182f71 (patch) | |
tree | 99b7c355c7add14f7f68624d764d016cfa18e959 /index.php | |
parent | 35677336de4c01c4f6b02840222075c6ac963988 (diff) |
Additional (optional, defaults to off) logging of PEAR error details, which allows database issues to be more easily diagnosed.
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -43,7 +43,11 @@ function handleError($error) 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, '. 'so the site won\'t work properly. '. 'The site admins probably know about the problem, '. |