Skip to content

Commit

Permalink
Merge pull request #227 from ocsigen/4.03.0
Browse files Browse the repository at this point in the history
Update for 4.03.0
  • Loading branch information
Drup committed Apr 11, 2016
2 parents ebd0a99 + 011d0f4 commit 0abae01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions opam
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ depopts: [
conflicts: [
"react" {< "1.0.0"}
"ssl" {< "0.5.0"}
"ppx_tools" {< "1.0.0" }
]
available: [ocaml-version >= "4.01.0" & compiler != "4.02.1+BER"]
8 changes: 4 additions & 4 deletions ppx/ppx_lwt_ex.ml
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@ let lwt_log mapper fn args attrs loc =
else if List.mem level ["Fatal"; "Error"; "Warning"; "Notice"; "Info"; "Debug"] then
let args = List.map (fun (l,e) -> l, mapper.expr mapper e) args in
let new_exp =
let args = ("location", make_loc loc) ::
("section", [%expr __pa_log_section]) ::
List.remove_assoc "section" args in
let args = (Label.labelled "location", make_loc loc) ::
(Label.labelled "section", [%expr __pa_log_section]) ::
List.remove_assoc (Label.labelled "section") args in
[%expr
if [%e Exp.construct (def_loc (Ldot (Lident "Lwt_log", level))) None] >=
Lwt_log.Section.level __pa_log_section then
Expand All @@ -292,7 +292,7 @@ let lwt_log mapper fn args attrs loc =
[%e if ign then [%expr ()] else [%expr Lwt.return_unit]]]
in
try
let section = List.assoc "section" args in
let section = List.assoc (Label.labelled "section") args in
[%expr let __pa_log_section = [%e section] in [%e new_exp]]
with Not_found ->
[%expr let __pa_log_section = Lwt_log.Section.main in [%e new_exp]]
Expand Down

0 comments on commit 0abae01

Please sign in to comment.