Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #111 from basho/adt-1.2-compat

Compatability with beams compiled with lager 1.2
  • Loading branch information...
commit 2607490cf969279aec579065c7b88bb0def4468d 2 parents c237e6f + 4dc1d4a
@Vagabond Vagabond authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/lager.erl
View
6 src/lager.erl
@@ -27,7 +27,7 @@
clear_all_traces/0, stop_trace/1, status/0,
get_loglevel/1, set_loglevel/2, set_loglevel/3, get_loglevels/0,
update_loglevel_config/0, posix_error/1,
- safe_format/3, safe_format_chop/3,dispatch_log/5, pr/2]).
+ safe_format/3, safe_format_chop/3,dispatch_log/5,dispatch_log/9,pr/2]).
-type log_level() :: debug | info | notice | warning | error | critical | alert | emergency.
-type log_level_number() :: 0..7.
@@ -88,6 +88,10 @@ dispatch_log(Severity, Metadata, Format, Args, Size) when is_atom(Severity)->
end
end.
+%% backwards compatible with beams compiled with lager 1.x
+dispatch_log(Severity, _Module, _Function, _Line, _Pid, Metadata, Format, Args, Size) ->
+ dispatch_log(Severity, Metadata, Format, Args, Size).
+
%% @doc Manually log a message into lager without using the parse transform.
-spec log(log_level(), pid() | atom() | [tuple(),...], list()) -> ok | {error, lager_not_running}.
log(Level, Pid, Message) when is_pid(Pid); is_atom(Pid) ->
Please sign in to comment.
Something went wrong with that request. Please try again.