Crate lunatic_log

source ·
Expand description

A logging library for lunatic Rust applications.

A Subscriber is initialized in a lunatic::Process with init. Logs are emitted to the subscriber when the error, warn, info, debug, trace macros are used.

Example

use lunatic_log::{info, subscriber::fmt::FmtSubscriber};

// Initialize subscriber
init(FmtSubscriber::new(LevelFilter::Info).pretty());

// Log info message
info!("Hello, {}", "world");

Modules

Macros

  • Logs a message at the debug level.
  • Logs a message at the error level.
  • Logs a message at the info level.
  • Logs a message with a specified level.
  • Logs a message at the trace level.
  • Logs a message at the warn level.

Structs

  • An event to be logged by a subscriber, storing a message and metadata.
  • Metadata describing an Event.
  • The type returned by from_str when the string doesn’t match any of the log levels.

Enums

  • An enum representing the available verbosity levels of the logger.
  • An enum representing the available verbosity level filters of the logger.

Functions