diff --git a/lib/plug/cowboy/translator.ex b/lib/plug/cowboy/translator.ex index 28a4923..169b202 100644 --- a/lib/plug/cowboy/translator.ex +++ b/lib/plug/cowboy/translator.ex @@ -61,7 +61,7 @@ defmodule Plug.Cowboy.Translator do extra, " terminated\n" | Exception.format_exit({reason, stack}) - ], crash_reason: reason, domain: [:cowboy]} + ], crash_reason: {reason, stack}, domain: [:cowboy]} end defp log_exception?({%{__exception__: true} = exception, _}) do diff --git a/test/plug/cowboy/translator_test.exs b/test/plug/cowboy/translator_test.exs index 3d44ca4..d416df1 100644 --- a/test/plug/cowboy/translator_test.exs +++ b/test/plug/cowboy/translator_test.exs @@ -131,7 +131,7 @@ defmodule Plug.Cowboy.TranslatorTest do refute metadata =~ "conn: %Plug.Conn{" end - test "metadata in ranch/cowboy lined logs" do + test "metadata in ranch/cowboy linked logs" do {:ok, _pid} = Plug.Cowboy.http(__MODULE__, [], port: 9005) metadata = @@ -141,6 +141,7 @@ defmodule Plug.Cowboy.TranslatorTest do end) assert metadata =~ "crash_reason:" + assert metadata =~ "{GenServer, :call" assert metadata =~ "domain: [:cowboy]" end end