//! Logging configuration for application tracing.
//!
//! Provides file-based logging with daily rotation for tracing output.
use fs;
use io;
use Path;
use WorkerGuard;
/// Initialize file-based logging with daily rotation.
///
/// Creates log directory if needed and configures tracing to write to
/// `{log_dir}/tazuna.YYYY-MM-DD`.
///
/// Returns a `WorkerGuard` that must be held for logging to function.
/// Dropping the guard flushes pending logs.
///
/// # Errors
/// Returns error if log directory creation fails.