gleam/beam/logger

Types

pub type Event {
  Event(level: Level, meta: Map(Atom, Dynamic), message: Message)
}

Constructors

  • Event(level: Level, meta: Map(Atom, Dynamic), message: Message)
pub type Level {
  Emergency
  Alert
  Critical
  Error
  Warning
  Notice
  Info
  Debug
}

Constructors

  • Emergency
  • Alert
  • Critical
  • Error
  • Warning
  • Notice
  • Info
  • Debug
pub type Message {
  Format(string: String, args: List(Dynamic))
  Report(Dynamic)
  Str(String)
}

Constructors

  • Format(string: String, args: List(Dynamic))
  • Report(Dynamic)
  • Str(String)

Functions

pub fn add_handler(
  handler: fn(
    ExitReason,
    List(tuple(Atom, String, Int, String, Int)),
    Int,
  ) -> Nil,
) -> Nil
pub fn cast_log_event(raw: Dynamic) -> Result(Event, String)
pub fn cast_log_level(raw: Dynamic) -> Result(Level, String)
pub fn cast_log_message(raw: Dynamic) -> Result(Message, String)