Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix dialyzer warnings

  • Loading branch information...
commit bc338b22e934be1f092c8eee0b347dc6c11be584 1 parent cf4b3dc
Andrew Thompson Vagabond authored
Showing with 7 additions and 7 deletions.
  1. +3 −3 src/error_logger_lager_h.erl
  2. +4 −4 src/lager.erl
6 src/error_logger_lager_h.erl
View
@@ -102,11 +102,11 @@ handle_event(Event, State) ->
"Supervisor ~w had child ~s exit with reason ~s in context ~w",
[element(2, Name), Offender, format_reason(Reason), Ctx]);
_ ->
- ?LOG(error, Pid, ["SUPERVISOR REPORT ", print_silly_list(D)])
+ ?LOG(error, Pid, "SUPERVISOR REPORT " ++ print_silly_list(D))
end;
{error_report, _GL, {Pid, crash_report, [Self, Neighbours]}} ->
?CRASH_LOG(Event),
- ?LOG(error, Pid, ["CRASH REPORT ", format_crash_report(Self, Neighbours)]);
+ ?LOG(error, Pid, "CRASH REPORT " ++ format_crash_report(Self, Neighbours));
{warning_msg, _GL, {Pid, Fmt, Args}} ->
?LOG(warning, Pid, lager:safe_format(Fmt, Args, 4096));
{warning_report, _GL, {Pid, std_warning, Report}} ->
@@ -136,7 +136,7 @@ handle_event(Event, State) ->
?LOG(debug, P, "Supervisor ~w started ~s at pid ~w",
[element(2, Name), MFA, Pid]);
_ ->
- ?LOG(info, P, ["PROGRESS REPORT ", print_silly_list(D)])
+ ?LOG(info, P, "PROGRESS REPORT " ++ print_silly_list(D))
end;
_ ->
?LOG(warning, self(), "Unexpected error_logger event ~w", [Event])
8 src/lager.erl
View
@@ -85,14 +85,14 @@ dispatch_log(Severity, Metadata, Format, Args, Size) when is_atom(Severity)->
end.
%% @doc Manually log a message into lager without using the parse transform.
--spec log(log_level(), pid(), list()) -> ok | {error, lager_not_running}.
+-spec log(log_level(), pid() | [tuple(),...], list()) -> ok | {error, lager_not_running}.
log(Level, Pid, Message) when is_pid(Pid) ->
- dispatch_log(Level, [{pid,Pid}], Message, none, 4096);
+ dispatch_log(Level, [{pid,Pid}], Message, [], 4096);
log(Level, Metadata, Message) when is_list(Metadata) ->
- dispatch_log(Level, Metadata, Message, none, 4096).
+ dispatch_log(Level, Metadata, Message, [], 4096).
%% @doc Manually log a message into lager without using the parse transform.
--spec log(log_level(), pid(), string(), list()) -> ok | {error, lager_not_running}.
+-spec log(log_level(), pid() | [tuple(),...], string(), list()) -> ok | {error, lager_not_running}.
log(Level, Pid, Format, Args) when is_pid(Pid) ->
dispatch_log(Level, [{pid,Pid}], Format, Args, 4096);
log(Level, Metadata, Format, Args) when is_list(Metadata) ->
Please sign in to comment.
Something went wrong with that request. Please try again.