Module Async_smtp__Mail_log.Message

Wrapper arround Log.Message.t that allows access to various standardised tag names.

module Action : Core.Identifiable with type t = string
type 'a with_info = flows:Flows.t -> component:Component.t -> here:Core.Source_code_position.t -> ?⁠local_ip_address:Async.Socket.Address.Inet.t -> ?⁠remote_address:Core.Host_and_port.t -> ?⁠remote_ip_address:Async.Socket.Address.Inet.t -> ?⁠email:[ `Fingerprint of Mail_fingerprint.t | `Email of Async_smtp_types.Email.t | `Envelope of Async_smtp_types.Smtp_envelope.t ] -> ?⁠message_size:int -> ?⁠rfc822_id:string -> ?⁠local_id:Async_smtp_types.Smtp_envelope.Id.t -> ?⁠sender:[ `Sender of Async_smtp_types.Smtp_envelope.Sender.t | `String of string ] -> ?⁠recipients:[ `Email of Async_smtp_types.Email_address.t | `String of string ] list -> ?⁠spool_id:string -> ?⁠command:Async_smtp.Smtp_command.t -> ?⁠reply:Async_smtp.Smtp_reply.t -> ?⁠session_marker:Session_marker.t -> ?⁠tags:(string * string) list -> 'a
type t = Async.Log.Message.t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val create : (Action.t -> t) with_info
val debugf : (('a, unit, string, t) Core.format4 -> 'a) with_info
val of_error : (Core.Error.t -> t) with_info
val info : (unit -> t) with_info
val level : t -> Level.t
val time : t -> Core.Time.t
val flows : t -> Flows.t

Encoded as one tag 'flow' for each Flow id

val component : t -> Component.t

The originating component, encoded as tag 'component'. Use of with_flow_and_component will cause this tag to be rewritten.

val action : t -> Action.t

Alias for the message field.

val find_tag' : t -> tag:string -> f:(string -> 'a) -> 'a option
val find_tag : t -> tag:string -> string option
val tags : t -> (string * string) list
val rfc822_id : t -> string option
val local_id : t -> Async_smtp_types.Smtp_envelope.Id.t option
val spool_id : t -> string option
val sender : t -> [ `Sender of Async_smtp_types.Smtp_envelope.Sender.t | `String of string ] option
val recipients : t -> [ `Email of Async_smtp_types.Email_address.t | `String of string ] list option
val email : t -> Mail_fingerprint.t option
val local_ip_address : t -> Async.Socket.Address.Inet.t option
val remote_address : t -> Core.Host_and_port.t option
val remote_ip_address : t -> Async.Socket.Address.Inet.t option
val command : t -> Async_smtp.Smtp_command.t option
val reply : t -> Async_smtp.Smtp_reply.t option
val session_marker : t -> Session_marker.t option