From 7279554681da728deb74a87230de3a1021182f71 Mon Sep 17 00:00:00 2001 From: CiaranG Date: Wed, 4 Mar 2009 00:23:34 +0000 Subject: Additional (optional, defaults to off) logging of PEAR error details, which allows database issues to be more easily diagnosed. --- index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 914ba5bde..03c044415 100644 --- a/index.php +++ b/index.php @@ -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, '. -- cgit v1.2.3-54-g00ecf