Skip to content

Commit

Permalink
fix issue where we incorrectly logged stack traces
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Beck committed Nov 6, 2018
1 parent 701b886 commit af52ebf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions dbt/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,7 @@ def initialize_logger(debug_mode=False, path=None):
initialized = True


def logger_initialized():
return initialized

GLOBAL_LOGGER = logger
4 changes: 2 additions & 2 deletions dbt/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from dbt.logger import initialize_logger, GLOBAL_LOGGER as logger, \
initialized as logger_initialized
logger_initialized

import argparse
import os.path
Expand Down Expand Up @@ -91,7 +91,7 @@ def main(args=None):
logger.info("Encountered an error:")
logger.info(str(e))

if logger_initialized:
if logger_initialized():
logger.debug(traceback.format_exc())
elif not isinstance(e, RuntimeException):
# if it did not come from dbt proper and the logger is not
Expand Down

0 comments on commit af52ebf

Please sign in to comment.