package async_log

  1. Overview
  2. Docs

This function can be called to generate logging modules with the Log.t lazily instantiated, and prepopulated in the arguments.

This module provides functions like Global.sexp which logs without needing to provide a Log.t. At this point, it's recommended to use ppx_log instead.

include S
val level : unit -> Async_log_kernel.Level.t
val set_level : Async_log_kernel.Level.t -> unit
val set_output : Async_log_kernel.Output.t list -> unit
val get_output : unit -> Async_log_kernel.Output.t list
val set_on_error : [ `Raise | `Call of Core.Error.t -> unit ] -> unit
val get_time_source : unit -> Async_kernel.Synchronous_time_source.t
val set_time_source : Async_kernel.Synchronous_time_source.t -> unit
val would_log : Async_log_kernel.Level.t option -> bool
val set_level_via_param : unit -> unit Core.Command.Param.t

Functions that operate on a given log. In this case they operate on a single log global to the module.

val raw : ?time:Core.Time_float.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a
val info : ?time:Core.Time_float.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a
val error : ?time:Core.Time_float.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a
val debug : ?time:Core.Time_float.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a
val flushed : unit -> unit Async_kernel.Deferred.t
val printf : ?level:Async_log_kernel.Level.t -> ?time:Core.Time_float.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a
val raw_s : ?time:Core.Time_float.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val info_s : ?time:Core.Time_float.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val error_s : ?time:Core.Time_float.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val debug_s : ?time:Core.Time_float.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val sexp : ?level:Async_log_kernel.Level.t -> ?time:Core.Time_float.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val string : ?level:Async_log_kernel.Level.t -> ?time:Core.Time_float.t -> ?tags:(string * string) list -> string -> unit
val structured_message : ?level:Async_log_kernel.Level.t -> ?time:Core.Time_float.t -> ?tags:(string * string) list -> Ppx_log_types.Message_data.t -> Ppx_log_types.Message_source.t -> unit
val message : Async_log_kernel.Message.t -> unit
val message_event : Async_log_kernel.Message_event.t -> unit
val surround_s : on_subsequent_errors:[ `Call of exn -> unit | `Log | `Raise ] -> ?level:Async_log_kernel.Level.t -> ?time:Core.Time_float.t -> ?tags:(string * string) list -> Core.Sexp.t -> (unit -> 'a Async_kernel.Deferred.t) -> 'a Async_kernel.Deferred.t
val surroundf : on_subsequent_errors:[ `Call of exn -> unit | `Log | `Raise ] -> ?level:Async_log_kernel.Level.t -> ?time:Core.Time_float.t -> ?tags:(string * string) list -> ('a, unit, string, (unit -> 'b Async_kernel.Deferred.t) -> 'b Async_kernel.Deferred.t) Core.format4 -> 'a
OCaml

Innovation. Community. Security.