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.

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

raw printf like logging for raw (no level) messages. Raw messages are still output with a timestamp.

val info : ?time:Core.Time.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a

info printf like logging at the `Info log level

val error : ?time:Core.Time.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a

error printf like logging at the `Error log level

val debug : ?time:Core.Time.t -> ?tags:(string * string) list -> ('a, unit, string, unit) Core.format4 -> 'a

debug printf like logging at the `Debug log level

val sexp : ?level:Level.t -> ?time:Core.Time.t -> ?tags:(string * string) list -> Core.Sexp.t -> unit

sexp logging of sexps.

val surround_s : ?level:Level.t -> ?time:Core.Time.t -> ?tags:(string * string) list -> Core.Sexp.t -> (unit -> 'a) -> 'a

surround_s logs before and after. See more detailed comment for async surround.

val surroundf : ?level:Level.t -> ?time:Core.Time.t -> ?tags:(string * string) list -> ('a, unit, string, (unit -> 'b) -> 'b) Core.format4 -> 'a

surroundf logs before and after. See more detailed comment for async surround.

OCaml

Innovation. Community. Security.