Made verbose trace opt out.

This commit is contained in:
Rudi Grinberg 2012-09-12 11:45:08 -04:00
parent d69391d2dd
commit 8b433de006
1 changed files with 8 additions and 1 deletions

View File

@ -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());
}
}