package easy_logging_yojson
Module Easy_logging_yojson.HandlersSource
include module type of struct include Easy_logging.Handlers end
Type definitions
Source
type t = Easy_logging.Handlers.t = {mutable fmt : log_formatter;mutable level : Easy_logging__.Logging_types.level;mutable filters : filter list;output : string -> unit;
}Type of a handler
A handler is made of:
- a formatter that transforms a log item into a string.
- a level used to filter out items.
- an array of possible additional custom filters.
- an
outputfunction, that takes a string and does the output job.
Handlers creation helpers
Module to create handlers that output to stdout or stderr.
Module to create handlers that output to a file.
Used for quick handler creation, e.g.
Cli handler: outputs colored messages to stdout
let h = Handlers.make (Cli Debug)File handler : outputs messages to a given file
let h = Handlers.make (File ("filename", Debug))
Handlers setup
Sets the formatter of a handler.
Source
val cli_json_params_of_yojson :
Yojson.Safe.t ->
cli_json_params Ppx_deriving_yojson_runtime.error_orSource
val cli_json_desc_of_yojson :
Yojson.Safe.t ->
cli_json_desc Ppx_deriving_yojson_runtime.error_orSource
val cli_err_json_desc_of_yojson :
Yojson.Safe.t ->
cli_err_json_desc Ppx_deriving_yojson_runtime.error_orSource
val file_json_desc_params_of_yojson :
Yojson.Safe.t ->
file_json_desc_params Ppx_deriving_yojson_runtime.error_orSource
val file_json_desc_of_yojson :
Yojson.Safe.t ->
file_json_desc Ppx_deriving_yojson_runtime.error_orSource
val rotating_file_json_desc_params_to_yojson :
rotating_file_json_desc_params ->
Yojson.Safe.tSource
val rotating_file_json_desc_params_of_yojson :
Yojson.Safe.t ->
rotating_file_json_desc_params Ppx_deriving_yojson_runtime.error_orSource
val rotating_file_json_desc_of_yojson :
Yojson.Safe.t ->
rotating_file_json_desc Ppx_deriving_yojson_runtime.error_or