Permalink
Browse files

Intial support for R15 line numbers in errors

  • Loading branch information...
1 parent 5fd47ad commit e9ca33fda784d7f13c1e18d93386e9ed0febc79c @Vagabond Vagabond committed Oct 26, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/error_logger_lager_h.erl
@@ -242,6 +242,13 @@ format_mfa({M, F, A}) when is_list(A) ->
io_lib:format("~w:~w("++FmtStr++")", [M, F | Args]);
format_mfa({M, F, A}) when is_integer(A) ->
io_lib:format("~w:~w/~w", [M, F, A]);
+format_mfa({M, F, A, Props}) when is_list(Props) ->
+ case {proplists:get_value(file, Props), proplists:get_value(line, Props)} of
+ {undefined, undefined} ->
+ format_mfa({M, F, A});
+ {File, Line} ->
+ [format_mfa({M, F, A}), io_lib:format(" (~s:~w)", [File, Line])]
+ end;
format_mfa(Other) ->
io_lib:format("~w", [Other]).

0 comments on commit e9ca33f

Please sign in to comment.