rust_logger

Deterministic Logging for Rust Applications

rust_logger is a lightweight, deterministic logging library built for Rust‑based automation tools, monitoring utilities, and CLI applications.
It provides consistent formatting, timestamped output, and reproducible log behavior — ensuring that every consuming tool produces clean, operator‑grade logs with no ambiguity and no hidden state.

Overview

The library is designed around the same engineering principles that guide all Linktech Engineering tools:

  1. Determinism — identical input produces identical log output
  2. Reproducibility — logs are structured, timestamped, and machine‑readable
  3. Audit Transparency — every entry is explicit, consistent, and traceable
rust_logger provides a minimal, dependency‑light API that integrates cleanly into any Rust project.

Key Features

  1. Deterministic, single‑line log formatting
  2. UTC timestamped entries for audit clarity
  3. Minimal dependencies and lightweight footprint
  4. Consistent output across all consuming tools
  5. Simple API designed for automation and CLI workflows
  6. Structured log levels (info, warn, error, debug)

Log Format

Example Usage


// Basic usage example
use rust_logger::Logger;

fn main() {
    let log = Logger::new("my_app");

    log.info("Starting application");
    log.warn("Configuration file not found, using defaults");
    log.error("Unable to connect to database");
}
            

Architecture Overview

1. Initialization Layer

Applications create a logger instance with a defined component or tool name.
This ensures consistent identification across logs and tools.

2. Formatting Layer

Messages are transformed into deterministic, single‑line entries with timestamps and level prefixes.
No implicit formatting, no hidden metadata.

3. Output Layer

Logs are written to stdout or a file depending on the consuming tool’s configuration.
All output is append‑only and audit‑transparent.

Current Status

Roadmap

Near‑Term

Mid‑Term

Long‑Term

Why rust_logger Exists

Most Rust logging frameworks are flexible but non‑deterministic, producing multi‑line output, inconsistent formatting, or environment‑dependent behavior.
rust_logger solves this by applying deterministic engineering principles:

  1. explicit formatting
  2. reproducible output
  3. audit‑transparent timestamps
  4. minimal dependencies
  5. operator‑grade clarity
It’s not just a logger — it’s a deterministic logging engine for automation tools.

Links

Related Projects