Skip to content

Commit

Permalink
fix: make sure we don't fail when reading log ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Dec 4, 2024
1 parent b63617e commit a639077
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/log/logger.ml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ let to_event_if_ (p : level -> bool) ~emit_ev : Logs.reporter =
let src = name_of_src src in

(* get surrounding tags *)
let ambient_tags = Log_ctx.get_tags_from_ctx () in
let ambient_tags =
try Log_ctx.get_tags_from_ctx () with _ -> Logs.Tag.empty
in

let k (tags : Logs.Tag.set) msg =
(* remove and convert rich tags *)
Expand Down

0 comments on commit a639077

Please sign in to comment.