Skip to content

Commit

Permalink
Merge pull request #1823 from heisencoder/fix/printer-log-level
Browse files Browse the repository at this point in the history
update logging levels in printer.py to match the intent
  • Loading branch information
drewbanin authored Oct 11, 2019
2 parents 81b755f + dc2ebf2 commit 2d100c3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/dbt/ui/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,12 @@ def print_run_result_error(
if is_warning:
color = yellow
info = 'Warning'
logger_fn = logger.warning
else:
color = red
info = 'Failure'
logger.info(color("{} in {} {} ({})").format(
logger_fn = logger.error
logger_fn(color("{} in {} {} ({})").format(
info,
result.node.resource_type,
result.node.name,
Expand All @@ -315,10 +317,10 @@ def print_run_result_error(
try:
int(result.status)
except ValueError:
logger.info(" Status: {}".format(result.status))
logger.error(" Status: {}".format(result.status))
else:
status = dbt.utils.pluralize(result.status, 'result')
logger.info(" Got {}, expected 0.".format(status))
logger.error(" Got {}, expected 0.".format(status))

if result.node.build_path is not None:
with TextOnly():
Expand All @@ -330,10 +332,10 @@ def print_run_result_error(
first = True
for line in result.error.split("\n"):
if first:
logger.info(yellow(line))
logger.error(yellow(line))
first = False
else:
logger.info(line)
logger.error(line)


def print_skip_caused_by_error(
Expand Down

0 comments on commit 2d100c3

Please sign in to comment.