= 1024" x-on:close-sidebar="sidebar=window.innerWidth >= 1024 && true">
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
include module type of struct include Easy_logging.Handlers end
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
output
function, that takes a string and does the output job.
Handlers creation helpers
module CliHandler = Easy_logging.Handlers.CliHandler
Module to create handlers that output
to stdout or stderr
.
module FileHandler = Easy_logging.Handlers.FileHandler
Module to create handlers that output to a file.
val default_config : config
type desc = Easy_logging.Handlers.desc
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
val set_level : t -> Easy_logging__.Logging_types.level -> unit
Sets the level of a handler.
val set_formatter : t -> log_formatter -> unit
Sets the formatter of a handler.
val apply : t -> Easy_logging__.Logging_types.log_item -> unit
Auxiliary function.
module FileHandlers : sig ... end
val config__to_yojson : config_ -> Yojson.Safe.t
val config__of_yojson :
Yojson.Safe.t ->
config_ Ppx_deriving_yojson_runtime.error_or
val config_to_yojson : config_ -> Yojson.Safe.t
val config_of_yojson :
Yojson.Safe.t ->
config_ Ppx_deriving_yojson_runtime.error_or
val cli_json_params_to_yojson : cli_json_params -> Yojson.Safe.t
val cli_json_params_of_yojson :
Yojson.Safe.t ->
cli_json_params Ppx_deriving_yojson_runtime.error_or
val cli_json_desc_to_yojson : cli_json_desc -> Yojson.Safe.t
val cli_json_desc_of_yojson :
Yojson.Safe.t ->
cli_json_desc Ppx_deriving_yojson_runtime.error_or
val cli_err_json_desc_to_yojson : cli_err_json_desc -> Yojson.Safe.t
val cli_err_json_desc_of_yojson :
Yojson.Safe.t ->
cli_err_json_desc Ppx_deriving_yojson_runtime.error_or
val file_json_desc_params_to_yojson : file_json_desc_params -> Yojson.Safe.t
val file_json_desc_params_of_yojson :
Yojson.Safe.t ->
file_json_desc_params Ppx_deriving_yojson_runtime.error_or
val file_json_desc_to_yojson : file_json_desc -> Yojson.Safe.t
val file_json_desc_of_yojson :
Yojson.Safe.t ->
file_json_desc Ppx_deriving_yojson_runtime.error_or
val rotating_file_json_desc_params_to_yojson :
rotating_file_json_desc_params ->
Yojson.Safe.t
val rotating_file_json_desc_params_of_yojson :
Yojson.Safe.t ->
rotating_file_json_desc_params Ppx_deriving_yojson_runtime.error_or
val rotating_file_json_desc_to_yojson :
rotating_file_json_desc ->
Yojson.Safe.t
val rotating_file_json_desc_of_yojson :
Yojson.Safe.t ->
rotating_file_json_desc Ppx_deriving_yojson_runtime.error_or
val _ :
Yojson.Safe.t ->
rotating_file_json_desc Ppx_deriving_yojson_runtime.error_or
val desc_of_yojson : Yojson.Safe.t -> (desc, string) result
val desc_to_yojson : desc -> Yojson.Safe.t