glimt/erlang_logger/common

Common functions used by the logger, basic_formatter and json_formatter

Functions

pub fn a(string: String) -> Atom

Shorthand for creating an Atom Equivalent to atom.create_from_string()

pub fn built_in_format(log_event: Dynamic, config: Dynamic) -> String

Calls the standard erlang formatter. Useful when a formatter is unable to format the log_event

pub fn format_dynamic(dynamic_value: Dynamic) -> String

String representation of a Dynamic value. If the dynamic value is a String it will be returned, otherwise the value will be converted using erlang.format

pub external fn logger_format(
  log_event: Dynamic,
  config: Dynamic,
) -> Charlist
pub external fn set_handler_config(
  handler_id: Atom,
  config_item: Atom,
  config: #(Atom, Dynamic),
) -> Nil

Set config for handler with handler_id

pub fn time_to_string(time: Int) -> String

Converts a epoch microsecond value to a rfc3339 string

Search Document