Module Easy_logging_yojson__Easy_logging_yojson_aux.Handlers
include E.Handlers
type log_formatter
= Easy_logging__.Logging_types.log_item -> string
Type definitions
type filter
= Easy_logging__.Logging_types.log_item -> bool
type t
=
{
mutable fmt : log_formatter;
mutable level : Easy_logging__.Logging_types.level;
mutable filters : filter list;
output : string -> unit;
}
Type of a handler
Handlers creation helpers
module CliHandler = Easy_logging.Handlers.CliHandler
Module to create handlers that
output
to stdout orstderr
.
module FileHandler = Easy_logging.Handlers.FileHandler
Module to create handlers that output to a file.
type config
=
{
file_handlers : FileHandler.config;
}
val default_config : config
type desc
=
|
Cli of Easy_logging__.Logging_types.level
|
CliErr of Easy_logging__.Logging_types.level
|
File of string * Easy_logging__.Logging_types.level
|
RotatingFile of string * Easy_logging__.Logging_types.level * int * int
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
type config_
= E.Handlers.config
=
{
file_handlers : FileHandlers.config;
}
val config__to_yojson : config_ -> Yojson.Safe.t
val config__of_yojson : Yojson.Safe.t -> config_ Ppx_deriving_yojson_runtime.error_or
val _ : config_ -> Yojson.Safe.t
val _ : 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
type cli_json_params
=
{
level : Logging_types.level;
}
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_params -> Yojson.Safe.t
val _ : Yojson.Safe.t -> cli_json_params Ppx_deriving_yojson_runtime.error_or
type cli_json_desc
=
{
cli : cli_json_params;
}
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_json_desc -> Yojson.Safe.t
val _ : Yojson.Safe.t -> cli_json_desc Ppx_deriving_yojson_runtime.error_or
type cli_err_json_desc
=
{
cli_err : cli_json_params;
}
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 _ : cli_err_json_desc -> Yojson.Safe.t
val _ : Yojson.Safe.t -> cli_err_json_desc Ppx_deriving_yojson_runtime.error_or
type file_json_desc_params
=
{
filename : string;
level : Logging_types.level;
}
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_params -> Yojson.Safe.t
val _ : Yojson.Safe.t -> file_json_desc_params Ppx_deriving_yojson_runtime.error_or
type file_json_desc
=
{
file : file_json_desc_params;
}
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 _ : file_json_desc -> Yojson.Safe.t
val _ : Yojson.Safe.t -> file_json_desc Ppx_deriving_yojson_runtime.error_or
type rotating_file_json_desc_params
=
{
filename : string;
level : Logging_types.level;
max_kb : int;
backup_count : int;
}
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_params -> Yojson.Safe.t
val _ : Yojson.Safe.t -> rotating_file_json_desc_params Ppx_deriving_yojson_runtime.error_or
type rotating_file_json_desc
=
{
rotating_file : rotating_file_json_desc_params;
}
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 _ : rotating_file_json_desc -> Yojson.Safe.t
val _ : Yojson.Safe.t -> rotating_file_json_desc Ppx_deriving_yojson_runtime.error_or
val desc_of_yojson : Yojson.Safe.t -> (desc, string) Stdlib.result
val desc_to_yojson : desc -> Yojson.Safe.t