Skip to content

Commit

Permalink
add get_default_level()
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Mar 8, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 37f8a23 commit b52f150
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/core/trace_core.ml
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ let[@inline] enabled () =
| None -> false
| Some _ -> true

let[@inline] get_default_level () = A.get default_level_
let[@inline] set_default_level l = A.set default_level_ l
let[@inline] set_current_level l = A.set current_level_ l
let[@inline] get_current_level () = A.get current_level_
7 changes: 6 additions & 1 deletion src/core/trace_core.mli
Original file line number Diff line number Diff line change
@@ -22,9 +22,14 @@ val enabled : unit -> bool
This is fast, so that the traced program can check it before creating
any span or message. *)

val get_default_level : unit -> Level.t
(** Current default level for spans.
@since NEXT_RELEASE *)

val set_default_level : Level.t -> unit
(** Set level used for spans that do not specify it. The default
default value is [Level.Trace] *)
default value is [Level.Trace].
@since NEXT_RELEASE *)

val with_span :
?level:Level.t ->

0 comments on commit b52f150

Please sign in to comment.