Skip to content

Commit e04a7ae

Browse files
author
José Valim
committed
Merge pull request #2651 from fishcakez/translator_format
Improve translator formatting
2 parents 0b1c8c9 + 2c009d1 commit e04a7ae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/logger/lib/logger/translator.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ defmodule Logger.Translator do
6060

6161
def translate(_min_level, :info, :report,
6262
{:std_info, [application: app, exited: reason, type: _type]}) do
63-
{:ok, "Application #{app} exited with reason #{Exception.format_exit(reason)}"}
63+
{:ok, "Application #{app} exited: #{Application.format_error(reason)}"}
6464
end
6565

6666
def translate(min_level, :error, :report, {:supervisor_report, data}) do
@@ -206,7 +206,7 @@ defmodule Logger.Translator do
206206
{:ok, ["Process ", crash_name(pid, name) , " terminating\n",
207207
crash_info(min_level, [initial_call | crashed]),
208208
crash_linked(min_level, linked) |
209-
Exception.format_banner(kind, exception, stack)]}
209+
Exception.format(kind, exception, stack)]}
210210
end
211211

212212
defp translate_crash(min_level,
@@ -217,7 +217,7 @@ defmodule Logger.Translator do
217217
{:ok, ["Process ", crash_name(pid, name) , " terminating\n",
218218
crash_info(min_level, crashed),
219219
crash_linked(min_level, linked) |
220-
Exception.format_banner(kind, exception, stack)]}
220+
Exception.format(kind, exception, stack)]}
221221
end
222222

223223
defp crash_name(pid, []), do: inspect(pid)

lib/logger/test/logger/translator_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ defmodule Logger.TranslatorTest do
119119
:ok = Application.start(:eex)
120120
Application.stop(:eex)
121121
end) =~ """
122-
Application eex exited with reason :stopped
122+
Application eex exited: :stopped
123123
"""
124124
end
125125

0 commit comments

Comments
 (0)