package easy_logging

  1. Overview
  2. Docs
Module to log messages. Aimed at being both powerful and easy to use

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.8.2.tar.gz
md5=467a966433b97693e0c226a90b9b833e
sha512=d4b97a29225c454a2d8ed04495aa7ecd3b012d7258372be2450e9b672498ba24ce9a3079307e762e12948661bc1e104a90f167fabf60c212fe67b13d6c4edf51

doc/easy_logging/Easy_logging/Logging/index.html

Module Easy_logging.LoggingSource

Sourcetype level =
  1. | Debug
  2. | Trace
  3. | Info
  4. | Warning
  5. | Error
  6. | Flash
  7. | NoLevel

Possible level of a log item.

Sourceval level_of_string : string -> (level, string) result
Sourceval show_level : level -> string
Sourceval pp_level : Format.formatter -> level -> unit
Sourcetype log_item = {
  1. level : level;
  2. logger_name : string;
  3. msg : string;
  4. tags : string list;
  5. timestamp : float;
}
Sourceval debug : bool ref
Sourceclass logger : ?parent:logger option -> string -> object ... end
Sourceval get_logger : string -> logger

Returns a registered logger by name, creating it if does not exist.

Sourceval make_logger : ?propagate:bool -> string -> level -> Handlers.desc list -> logger

Convenience method used to fetch a logger and initialize it.

make_logger name level handlers_descs calls get_logger with the given name, then sets its level, adds the handlers, and then returns it.

Calling this function multiple times with the same name will keep adding handlers.

Sourceval handlers_config : Handlers.config ref
Sourceval set_handlers_config : Handlers.config -> unit
Sourceval tree_to_yojson : unit -> [> `Assoc of (string * [> `List of 'a list | `String of string ]) list ] as 'a

Returns the logging tree as yojson, with logger name and level as node data.