glimt/erlang_logger/log_event
Types
Gleam representation of an erlang log event
pub type LogEvent {
Message(
time_us: Int,
level: Level,
message: String,
pid: Pid,
logger_name: Option(String),
error: Option(String),
)
Report(
time_us: Int,
level: Level,
report: List(#(Dynamic, Dynamic)),
pid: Pid,
logger_name: Option(String),
error: Option(String),
)
}
Constructors
-
Message( time_us: Int, level: Level, message: String, pid: Pid, logger_name: Option(String), error: Option(String), )
-
Report( time_us: Int, level: Level, report: List(#(Dynamic, Dynamic)), pid: Pid, logger_name: Option(String), error: Option(String), )
Functions
pub fn decode_log_event(log_event: Dynamic) -> Result(
LogEvent,
List(DecodeError),
)
Translate a log event from erlang logger to corresponding gleam representation This function is useful when implementing custom formatters for the erlang logger