Skip to main content

Crate arcbox_logging

Crate arcbox_logging 

Source
Expand description

Shared logging infrastructure for ArcBox components.

Provides a unified tracing initialization with:

  • Size-based log file rotation (default: 10 MB per file, 5 files max)
  • JSON format for files (machine-parseable)
  • Human-readable format for stderr (when running in foreground)
  • Non-blocking file writes via tracing-appender

Structs§

LogConfig
Configuration for log initialization.
LogGuard
Guard that keeps the non-blocking writer alive. Must be held for the lifetime of the program — dropping it flushes pending writes.
SizeRotatingWriter
A Write implementation that rotates the underlying file when it exceeds max_size bytes. Thread-safe via internal mutex.

Functions§

init
Initialize the tracing subscriber with file + optional stderr output.