package async_unix

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Async programs often have a non-Async portion that runs before the scheduler begins to capture command line options, do setup, read configs, etc. This module provides limited global logging functions to be used during that period. Calling these functions after the scheduler has started will raise an exception. They otherwise behave similarly to the logging functions in the Async world.

There are more detailed comments for the API below near the non-blocking signatures.

module Output : sig ... end
val level : unit -> Level.t
val set_level : Level.t -> unit
val set_output : Output.t -> unit
val set_time_source : Async_kernel.Synchronous_time_source.t -> unit
val set_transform : (Message.t -> Message.t) option -> unit
val raw : ?time:Time_unix.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a
val info : ?time:Time_unix.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a
val error : ?time:Time_unix.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a
val debug : ?time:Time_unix.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a
val raw_s : ?time:Time_unix.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val info_s : ?time:Time_unix.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val error_s : ?time:Time_unix.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val debug_s : ?time:Time_unix.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val sexp : ?level:Level.t -> ?time:Time_unix.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val surround_s : ?level:Level.t -> ?time:Time_unix.t -> ?tags:(string * string) list -> Core.Sexp.t -> (unit -> 'a) -> 'a
val surroundf : ?level:Level.t -> ?time:Time_unix.t -> ?tags:(string * string) list -> ('a, unit, string, (unit -> 'b) -> 'b) Core.format4 -> 'a
OCaml

Innovation. Community. Security.