Module logger

Module logger 

Source
Expand description

Logging infrastructure for the Joy CLI.

This module provides a structured logging setup using the tracing ecosystem. It supports multiple verbosity levels, colored output, and environment-based configuration for debugging.

§Features

  • Verbosity control: --verbose for debug, --quiet for errors only
  • Color support: Automatic detection with --no-color override
  • Environment filters: Override via RUST_LOG environment variable
  • Structured logging: Use tracing spans for context

§Example

use fob_cli::logger::init_logger;
use tracing::{info, debug, error};

init_logger(false, false, false);

info!("Starting build");
debug!("Processing module: {}", "index.ts");

Functions§

init_logger
Initialize the tracing subscriber with the specified options.
init_logger_with_filter
Initialize logger with custom environment filter.
should_use_colors
Check if colored output should be enabled.