Skip to main content

Module logging

Module logging 

Source
Expand description

Logging infrastructure for Rusty Stack.

Provides a dual-layer logging setup:

  • File layer: Structured JSON logs at ~/.mlstack/logs/ with daily rotation (max 3 files retained for storage efficiency).
  • Stdout layer: Compact human-readable progress for CLI updates.

§Usage

ⓘ
use rusty_stack::logging::init_logging;

let _guard = init_logging("update");
// tracing::info!, tracing::error!, etc. now work

Functions§

init_batch_logging
Initialize logging for non-interactive/batch contexts.
init_interactive_logging
Initialize logging for interactive contexts (the update command’s inline selection + animated apply panel).
init_logging
Initialize the dual-layer logging system.
log_dir
Log directory under ~/.mlstack/logs/ (canonical, sudo-aware path).
log_file_path
Get the path to the most recent log file for a given context.