From 1a50bdb09d270a6aaf5d9530171ae9ecfadcdce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Sat, 8 Nov 2008 00:35:08 +0000 Subject: Add backtrace in the logs whenever log_error is called and debugging($g["debug"] ) is active. --- etc/inc/pfsense-utils.inc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'etc') 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; } -- cgit v1.1