From bd9ea54126c656230ce56530d3c6aabf36c07dc1 Mon Sep 17 00:00:00 2001 From: Moritz Ploss Date: Thu, 12 Aug 2021 13:48:39 +0200 Subject: [PATCH] fix: Bug in parse_message --- rebar.config | 4 ++-- src/raven_error_logger.erl | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/rebar.config b/rebar.config index e2d0b88..03a9b91 100644 --- a/rebar.config +++ b/rebar.config @@ -6,6 +6,6 @@ {platform_define, "^R14", no_callbacks} ]}. {deps, [ - {jsx, ".*", {git, "git@github.com:talentdeficit/jsx.git", {branch, master}}}, - {stdlib2, {git, "git@github.com:kivra/stdlib2.git", {branch, master}}} + {jsx, ".*", {git, "git@github.com:kivra/jsx.git", {tag, "2.9.0"}}}, + {stdlib2, {git, "git@github.com:kivra/stdlib2.git", {branch, master}}} ]}. diff --git a/src/raven_error_logger.erl b/src/raven_error_logger.erl index 1830fe7..ba36a3e 100644 --- a/src/raven_error_logger.erl +++ b/src/raven_error_logger.erl @@ -284,10 +284,8 @@ parse_message(Level, Pid, "Exception: ~p\n" [{{Class, Reason}, [{_, _, _, _} | _] = Stacktrace}, Extras]) when Class =:= exit; Class =:= error; Class =:= throw -> {User, ExtrasWithoutUser} = extract_user(Extras), - ExtrasLevel = proplists:get_value(level, Extras, false), - TheLevel = ExtrasLevel orelse Level, {format(Format, [{Class, Reason}, Extras]), [ - {level, TheLevel}, + {level, proplists:get_value(level, Extras, Level)}, {exception, {Class, Reason}}, {stacktrace, Stacktrace}, {extra, [