Module Internal_event.Simple

type 'a t

Event declarations where 'a is the type of the event parameters.

val emit : 'a t -> 'a -> unit Lwt.t

Emit an instance of an event.

val emit__dont_wait__use_with_care : 'a t -> 'a -> unit

Emit an instance of an event but do not wait for completion. Only use if you really need to not wait for logging resolution before continuing. May cause increased memory usage and out-of-order log messages.

val declare_0 : ?⁠section:string list -> name:string -> msg:string -> ?⁠level:level -> unit -> unit t

Declare an event with no parameters.

val declare_1 : ?⁠section:string list -> name:string -> msg:string -> ?⁠level:level -> ?⁠pp1:(Stdlib.Format.formatter -> 'a -> unit) -> (string * 'a Data_encoding.t) -> 'a t

Declare an event with one parameter.

val declare_2 : ?⁠section:string list -> name:string -> msg:string -> ?⁠level:level -> ?⁠pp1:(Stdlib.Format.formatter -> 'a -> unit) -> (string * 'a Data_encoding.t) -> ?⁠pp2:(Stdlib.Format.formatter -> 'b -> unit) -> (string * 'b Data_encoding.t) -> ('a * 'b) t

Declare an event with two parameters.

val declare_3 : ?⁠section:string list -> name:string -> msg:string -> ?⁠level:level -> ?⁠pp1:(Stdlib.Format.formatter -> 'a -> unit) -> (string * 'a Data_encoding.t) -> ?⁠pp2:(Stdlib.Format.formatter -> 'b -> unit) -> (string * 'b Data_encoding.t) -> ?⁠pp3:(Stdlib.Format.formatter -> 'c -> unit) -> (string * 'c Data_encoding.t) -> ('a * 'b * 'c) t

Declare an event with three parameters.

val declare_4 : ?⁠section:string list -> name:string -> msg:string -> ?⁠level:level -> ?⁠pp1:(Stdlib.Format.formatter -> 'a -> unit) -> (string * 'a Data_encoding.t) -> ?⁠pp2:(Stdlib.Format.formatter -> 'b -> unit) -> (string * 'b Data_encoding.t) -> ?⁠pp3:(Stdlib.Format.formatter -> 'c -> unit) -> (string * 'c Data_encoding.t) -> ?⁠pp4:(Stdlib.Format.formatter -> 'd -> unit) -> (string * 'd Data_encoding.t) -> ('a * 'b * 'c * 'd) t

Declare an event with four parameters.

val declare_5 : ?⁠section:string list -> name:string -> msg:string -> ?⁠level:level -> ?⁠pp1:(Stdlib.Format.formatter -> 'a -> unit) -> (string * 'a Data_encoding.t) -> ?⁠pp2:(Stdlib.Format.formatter -> 'b -> unit) -> (string * 'b Data_encoding.t) -> ?⁠pp3:(Stdlib.Format.formatter -> 'c -> unit) -> (string * 'c Data_encoding.t) -> ?⁠pp4:(Stdlib.Format.formatter -> 'd -> unit) -> (string * 'd Data_encoding.t) -> ?⁠pp5:(Stdlib.Format.formatter -> 'e -> unit) -> (string * 'e Data_encoding.t) -> ('a * 'b * 'c * 'd * 'e) t

Declare an event with five parameters.

val declare_6 : ?⁠section:string list -> name:string -> msg:string -> ?⁠level:level -> ?⁠pp1:(Stdlib.Format.formatter -> 'a -> unit) -> (string * 'a Data_encoding.t) -> ?⁠pp2:(Stdlib.Format.formatter -> 'b -> unit) -> (string * 'b Data_encoding.t) -> ?⁠pp3:(Stdlib.Format.formatter -> 'c -> unit) -> (string * 'c Data_encoding.t) -> ?⁠pp4:(Stdlib.Format.formatter -> 'd -> unit) -> (string * 'd Data_encoding.t) -> ?⁠pp5:(Stdlib.Format.formatter -> 'e -> unit) -> (string * 'e Data_encoding.t) -> ?⁠pp6:(Stdlib.Format.formatter -> 'f -> unit) -> (string * 'f Data_encoding.t) -> ('a * 'b * 'c * 'd * 'e * 'f) t

Declare an event with six parameters.

val declare_7 : ?⁠section:string list -> name:string -> msg:string -> ?⁠level:level -> ?⁠pp1:(Stdlib.Format.formatter -> 'a -> unit) -> (string * 'a Data_encoding.t) -> ?⁠pp2:(Stdlib.Format.formatter -> 'b -> unit) -> (string * 'b Data_encoding.t) -> ?⁠pp3:(Stdlib.Format.formatter -> 'c -> unit) -> (string * 'c Data_encoding.t) -> ?⁠pp4:(Stdlib.Format.formatter -> 'd -> unit) -> (string * 'd Data_encoding.t) -> ?⁠pp5:(Stdlib.Format.formatter -> 'e -> unit) -> (string * 'e Data_encoding.t) -> ?⁠pp6:(Stdlib.Format.formatter -> 'f -> unit) -> (string * 'f Data_encoding.t) -> ?⁠pp7:(Stdlib.Format.formatter -> 'g -> unit) -> (string * 'g Data_encoding.t) -> ('a * 'b * 'c * 'd * 'e * 'f * 'g) t

Declare an event with seven parameters.

val declare_8 : ?⁠section:string list -> name:string -> msg:string -> ?⁠level:level -> ?⁠pp1:(Stdlib.Format.formatter -> 'a -> unit) -> (string * 'a Data_encoding.t) -> ?⁠pp2:(Stdlib.Format.formatter -> 'b -> unit) -> (string * 'b Data_encoding.t) -> ?⁠pp3:(Stdlib.Format.formatter -> 'c -> unit) -> (string * 'c Data_encoding.t) -> ?⁠pp4:(Stdlib.Format.formatter -> 'd -> unit) -> (string * 'd Data_encoding.t) -> ?⁠pp5:(Stdlib.Format.formatter -> 'e -> unit) -> (string * 'e Data_encoding.t) -> ?⁠pp6:(Stdlib.Format.formatter -> 'f -> unit) -> (string * 'f Data_encoding.t) -> ?⁠pp7:(Stdlib.Format.formatter -> 'g -> unit) -> (string * 'g Data_encoding.t) -> ?⁠pp8:(Stdlib.Format.formatter -> 'h -> unit) -> (string * 'h Data_encoding.t) -> ('a * 'b * 'c * 'd * 'e * 'f * 'g * 'h) t

Declare an event with eight parameters.