Bardo.Logger (Bardo v0.1.0)

View Source

Custom logging functionality for the Bardo system.

Provides structured logging capabilities and integration with the standard Elixir Logger. Also includes filters for specialized log handling.

Summary

Types

A structured log entry with component information.

Functions

Log an alert message.

Log a critical message.

Log a debug message.

Log an emergency message.

Log an error message.

Log an info message.

Log a notice message.

Filter to only show logs from scape modules.

Filter to only show status messages or error results.

Log a warning message.

Types

log_body()

@type log_body() ::
  {in_mod :: atom(), what :: atom(), result :: :ok | :error,
   details :: String.t() | nil, params :: [any()] | []}

A structured log entry with component information.

Functions

alert(message)

@spec alert(log_body() | String.t()) :: :ok

Log an alert message.

critical(message)

@spec critical(log_body() | String.t()) :: :ok

Log a critical message.

debug(message)

@spec debug(log_body() | String.t()) :: :ok

Log a debug message.

emergency(message)

@spec emergency(log_body() | String.t()) :: :ok

Log an emergency message.

error(message)

@spec error(log_body() | String.t()) :: :ok

Log an error message.

info(message)

@spec info(log_body() | String.t()) :: :ok

Log an info message.

notice(message)

@spec notice(log_body() | String.t()) :: :ok

Log a notice message.

scape_filter(log_event, action)

@spec scape_filter(map(), :log | :stop) :: map() | :ignore | :stop

Filter to only show logs from scape modules.

status_filter(log_event, action)

@spec status_filter(map(), :log | :stop) :: map() | :ignore | :stop

Filter to only show status messages or error results.

warning(message)

@spec warning(log_body() | String.t()) :: :ok

Log a warning message.