type logger = {
stream : string Lwt_stream.t; |
push : string -> unit; |
elements : int Stdlib.ref; |
max_elements : int; |
dropped_elements : int Stdlib.ref; |
}
val create : int -> logger
val logger : logger
val access_logger : logger
val log_level : level Stdlib.ref
val int_of_level : level -> int
val string_of_level : level -> string
val log : level -> string -> ('a, unit, string, unit) Stdlib.format4 -> 'a
val debug : string -> ('a, unit, string, unit) Stdlib.format4 -> 'a
val info : string -> ('a, unit, string, unit) Stdlib.format4 -> 'a
val warn : string -> ('a, unit, string, unit) Stdlib.format4 -> 'a
val error : string -> ('a, unit, string, unit) Stdlib.format4 -> 'a
type access_type =
| Coalesce |
| Conflict |
| Commit |
| Newconn |
| Endconn |
| Debug of string |
| Start_transaction |
| End_transaction |
| Request of Xs_protocol.Request.payload |
| Response of Xs_protocol.Response.payload * string option |
val string_of_access_type : access_type -> string
val disable_coalesce : bool Stdlib.ref
val disable_conflict : bool Stdlib.ref
val disable_commit : bool Stdlib.ref
val disable_newconn : bool Stdlib.ref
val disable_endconn : bool Stdlib.ref
val disable_transaction : bool Stdlib.ref
val disable_request : string list Stdlib.ref
val disable_reply_ok : string list Stdlib.ref
val disable_reply_err : string list Stdlib.ref
val access_type_disabled : access_type -> bool
val access_type_enabled : access_type -> bool
val access_logging : con:string -> tid:int32 -> ?data:string -> access_type -> unit
val request : tid:int32 -> con:string -> Xs_protocol.Request.payload -> unit
val response : tid:int32 -> con:string -> ?info:string -> Xs_protocol.Response.payload -> unit