Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Compatability with beams compiled with lager 1.2 #111

Merged
merged 1 commit into from

2 participants

@Vagabond
Collaborator

No description provided.

@Vagabond Vagabond was assigned
@mshonle mshonle was assigned
@mshonle

+1

@Vagabond Vagabond merged commit 2607490 into master
@seancribbs seancribbs deleted the adt-1.2-compat branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 13, 2013
  1. @Vagabond
This page is out of date. Refresh to see the latest.
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) ->
Something went wrong with that request. Please try again.