Loggermodule Stable : sig ... endtype t = Stable.V1.tmodule Level : sig ... endmodule Time : sig ... endmodule Source : sig ... endmodule Metadata : sig ... endval metadata : t -> Metadata.tUsed only when dealing with the raw logging function
module Message : sig ... endmodule Processor : sig ... endA Processor is a module which processes structured log * messages into strings. This is used as part of defining * a Consumer.
module Transport : sig ... endA Transport is a module which represent a destination * for a log strings. This is used as part of defining a * Consumer.
module Consumer_registry : sig ... endThe Consumer_registry is a global registry where consumers * of the Logger can be registered. Each Consumer consists of * a Processor and a Transport. The processor filters and * serializes structured log messages to strings, and the * transport encapsulates the side effects of the consumer. * Every Consumer is registered under some unique id to * ensure the code does not accidentally attach the same * consumer multiple times.
type 'a log_function =
t ->
module_:string ->
location:string ->
?tags:Logger__Tags.t list ->
?metadata:( string, Yojson.Safe.t ) Core_kernel.List.Assoc.t ->
?event_id:Structured_log_events.id ->
( 'a, unit, string, unit ) Core_kernel.format4 ->
'aval create :
?metadata:( string, Yojson.Safe.t ) Core_kernel.List.Assoc.t ->
?id:string ->
unit ->
tval null : unit -> tval trace : _ log_functionval debug : _ log_functionval info : _ log_functionval warn : _ log_functionval error : _ log_functionval spam :
t ->
?tags:Logger__Tags.t list ->
?metadata:( string, Yojson.Safe.t ) Core_kernel.List.Assoc.t ->
( 'a, unit, string, unit ) Core_kernel.format4 ->
'aspam is a special log level that omits location information
val faulty_peer : _ log_functionval faulty_peer_without_punishment : _ log_functionval fatal : _ log_functionmodule Structured : sig ... endLogging of structured events.
module Str = StructuredShort alias for Structured.
module Logger_id : sig ... end