Skip to content

Commit

Permalink
Do not format empty stacktrace
Browse files Browse the repository at this point in the history
  • Loading branch information
arcusfelis committed May 18, 2021
1 parent 26bcc85 commit e58ce81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/logger/mongoose_log_filter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ format_stacktrace_filter(Event=#{msg := {report, Msg=#{stacktrace := S}}}, _) ->
<<>> -> Msg;
_ -> Msg#{stacktrace_args => FmtArgs}
end,
Event#{msg => {report, Msg2#{stacktrace => format_stacktrace(S)} }};
Msg3 = case format_stacktrace(S) of
<<>> -> Msg2;
FmtStack -> Msg2#{stacktrace => FmtStack}
end,
Event#{msg => {report, Msg3 }};
format_stacktrace_filter(Event, _) ->
Event.

Expand Down

0 comments on commit e58ce81

Please sign in to comment.