From 8b433de006c1d0b9029470c6a6fd34fa30131e41 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg <rudi.grinberg@sourcefabric.org> Date: Wed, 12 Sep 2012 11:45:08 -0400 Subject: [PATCH] Made verbose trace opt out. --- airtime_mvc/public/index.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/index.php b/airtime_mvc/public/index.php index d65654e9a..f7eff6fed 100644 --- a/airtime_mvc/public/index.php +++ b/airtime_mvc/public/index.php @@ -22,6 +22,9 @@ defined('APPLICATION_PATH') defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production')); +defined('VERBOSE_STACK_TRACE') + || define('VERBOSE_STACK_TRACE', (getenv('VERBOSE_STACK_TRACE') ? getenv('VERBOSE_STACK_TRACE') : true)); + // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( get_include_path(), @@ -67,6 +70,10 @@ try { echo $e->getTraceAsString(); echo "</pre>"; Logging::info($e->getMessage()); - Logging::info($e->getTrace()); + if (VERBOSE_STACK_TRACE) { + Logging::info($e->getTrace()); + } else { + Logging::info($e->getTraceAsString()); + } }