summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-11-08 00:35:08 +0000
committerErmal Luçi <eri@pfsense.org>2008-11-08 00:35:08 +0000
commit1a50bdb09d270a6aaf5d9530171ae9ecfadcdce5 (patch)
tree3ad8dbd2dbb2b552800f6298ece5dad44aad5010 /etc
parent93347bbbaf3000cd85d07d7f4644c2af3ff7d4f1 (diff)
downloadpfsense-1a50bdb09d270a6aaf5d9530171ae9ecfadcdce5.zip
pfsense-1a50bdb09d270a6aaf5d9530171ae9ecfadcdce5.tar.gz
Add backtrace in the logs whenever log_error is called and debugging($g["debug"] ) is active.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index c3f2673..81d41f9 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -863,8 +863,11 @@ function get_dns_servers() {
* null
******/
function log_error($error) {
+ global $g;
$page = $_SERVER['SCRIPT_NAME'];
syslog(LOG_WARNING, "$page: $error");
+ if ($g['debug'])
+ syslog(LOG_WARNING, var_dump(debug_backtrace()));
return;
}
OpenPOWER on IntegriCloud