1 unstable release

Uses new Rust 2024

0.1.0 Dec 26, 2025

#696 in Debugging

Download history 25/week @ 2025-12-23 94/week @ 2025-12-30 37/week @ 2026-01-06 54/week @ 2026-01-13 96/week @ 2026-01-20 106/week @ 2026-01-27 103/week @ 2026-02-03 16/week @ 2026-02-10 115/week @ 2026-02-17 117/week @ 2026-02-24

391 downloads per month
Used in 41 crates (20 directly)

Apache-2.0

32KB
668 lines

armature-log

Logging utilities for the Armature framework.

Features

  • JSON by Default - Structured logging for production
  • Pretty Output - Human-readable format for development
  • Environment Config - Configure via ARMATURE_* env vars
  • Runtime Config - Programmatic configuration API
  • Zero Dependencies - Minimal footprint (optional tracing integration)

Installation

[dependencies]
armature-log = "0.1"

Quick Start

use armature_log::{info, debug, error};

fn main() {
    // Uses ARMATURE_DEBUG and ARMATURE_LOG_LEVEL env vars
    armature_log::init();

    info!("Application started");
    debug!("Debug message");
    error!("Something went wrong");
}

Configuration

Environment Variables

Variable Values Default
ARMATURE_DEBUG 1, true false
ARMATURE_LOG_LEVEL trace, debug, info, warn, error info
ARMATURE_LOG_FORMAT json, pretty, compact json
ARMATURE_LOG_COLOR 1, true auto-detect TTY

Programmatic

use armature_log::{configure, Format, Level};

configure()
    .format(Format::Pretty)
    .level(Level::Debug)
    .color(true)
    .apply();

Presets

// Development: Pretty, Debug, Colors
armature_log::preset_development();

// Production: JSON, Info, No colors
armature_log::preset_production();

License

MIT OR Apache-2.0

Dependencies

~1–14MB
~98K SLoC