A logging library for lunatic Rust applications.

Why a new logging library?

Current logging solutions in Rust (log, tracing, ...) depend on global static variables that are initialized at the start of the app. This doesn't work in lunatic, where each process gets their own memory space. You would need to re-initialize the logger for each process, and that is not practical.

lunatic-log allows you to run a log subscriber process that collects logging messages from all running processes.

How to use lunatic-log?

Add it as a dependency: toml lunatic-log = "0.1"

In your code:

```rust use logger_rs::{info, subscriber::fmt::FmtSubscriber, LevelFilter};

fn main() { // Initialize subscriber logger_rs::init(FmtSubscriber::new(LevelFilter::Info));

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

// Wait for events to propagate and display before exiting app
lunatic::sleep(std::time::Duration::from_millis(50));

} ```

License

Licensed under either of

at your option.