easy_logging
Module to log messages. Aimed at being both powerful and easy to use
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
Library easy_logging
type config = {
}
Configuration when creating a file handler.
- The
date_prefix
value is an optional Calender Printer String (as specified in the Calendar documentation), that will format the time at which the handler is created, and used as a prefix. - If the
versioning
value is not None, a versionning number is appended to the filename, based on already existing files. The integer gives the padding of versionning numbers. THIS OPTION MIGHT DISAPPEAR IN FUTURE RELEASES.
val default_config : config
val generate_prefix : config -> string
val generate_filename : config -> string -> string
val create_file : config -> string -> out_channel
make ~config level filename_base
creates a Handler that will output logs to the file created from filename_base
and config
val make_rotating :
?config:config ->
Easy_logging__Logging_types.level ->
string ->
int ->
int ->
t
make_rotating ~config level filename_base max_kbytes backup_count
creates a Handler that will output logs to a rotating set of files. The files are from filename_base
and config
. When the size of a log file is about to exceed max_kbytes
kb, a new file is created, and older log files are renamed. See the python RotatingFileHandler.