Skip to content

Commit

Permalink
Do not log traceback when log format is json (#7973) (#8056)
Browse files Browse the repository at this point in the history
* do not log traceback when log format is json

* changelog

(cherry picked from commit 283f716)

Co-authored-by: Chenyu Li <[email protected]>
  • Loading branch information
github-actions[bot] and ChenyuLInx authored Jul 12, 2023
1 parent 47103bc commit 529440a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20230627-224355.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Fix producing non json log when log format is json
time: 2023-06-27T22:43:55.071123-07:00
custom:
Author: ChenyuLInx
Issue: "7972"
2 changes: 1 addition & 1 deletion core/dbt/events/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def fire_event(e: Event) -> None:
STDOUT_LOG,
level_tag=e.level_tag(),
log_line=log_line,
exc_info=e.exc_info,
exc_info=False if flags.LOG_FORMAT == "json" else e.exc_info,
stack_info=e.stack_info,
extra=e.extra
)
Expand Down

0 comments on commit 529440a

Please sign in to comment.