17 releases (10 breaking)

0.11.2 Aug 22, 2024
0.10.0 Aug 14, 2024

#110 in Debugging

Download history 550/week @ 2024-07-27 282/week @ 2024-08-03 691/week @ 2024-08-10 355/week @ 2024-08-17 389/week @ 2024-08-24 503/week @ 2024-08-31 369/week @ 2024-09-07

1,766 downloads per month
Used in 2 crates

Apache-2.0

94KB
2K SLoC

Logforth Project

Crates.io Documentation MSRV 1.75 Apache 2.0 licensed Build Status

Overview

A versatile and extensible logging implementation.

Usage

Add the dependencies to your Cargo.toml with:

cargo add log
cargo add logforth

... where log is the logging facade and logforth is the logging implementation.

Then, you can use the logger with:

use log::LevelFilter;
use logforth::append;
use logforth::layout::TextLayout;
use logforth::Dispatch;
use logforth::Logger;

fn main() {
    Logger::new().dispatch(
        Dispatch::new()
            .filter(LevelFilter::Trace)
            .layout(TextLayout::default())
            .append(append::Stdout),
        )
        .apply()
        .unwrap();

    log::error!("Hello error!");
    log::warn!("Hello warn!");
    log::info!("Hello info!");
    log::debug!("Hello debug!");
    log::trace!("Hello trace!");
}

Read more demos under the examples directory.

Documentation

Read the online documents at https://docs.rs/logforth.

Supported Rust Versions (MSRV 1.75)

Logforth is built against the latest stable release. The minimum supported version is 1.75. The current Logforth version is not guaranteed to build on Rust versions earlier than the minimum supported version.

When to release a 1.0 version

After one year of practicing the interfaces, if there are no further blockers, I'll release a 1.0 version. So consequently, it can be as early as 2025-08.

License and Origin

This project is licensed under Apache License, Version 2.0.

The name Logforth comes from an antonym to the Logback project.

Dependencies

~3–13MB
~139K SLoC