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 raw : ?time:Core.Time.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a
val info : ?time:Core.Time.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a
val error : ?time:Core.Time.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a
val debug : ?time:Core.Time.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a
val raw_s : ?time:Core.Time.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val info_s : ?time:Core.Time.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val error_s : ?time:Core.Time.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val debug_s : ?time:Core.Time.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val sexp : ?level:Level.t -> ?time:Core.Time.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit
val surround_s : ?level:Level.t -> ?time:Core.Time.t -> ?tags:(string * string) list -> Core.Sexp.t -> (unit -> 'a) -> 'a
val surroundf : ?level:Level.t -> ?time:Core.Time.t -> ?tags:(string * string) list -> ('a, unit, string, (unit -> 'b) -> 'b) Core.format4 -> 'a