Module logging

Module logging 

Source
Expand description

Logging utilities for debugging and monitoring. Logging utilities for bubbletea-rs applications.

This module provides file-based logging functionality for Bubble Tea applications. Logging is controlled by the logging feature flag and requires the log crate for actual log output.

§Features

  • File-based logging with automatic file creation
  • Append-only logging to preserve existing log data
  • Graceful degradation when logging feature is disabled

§Usage

use bubbletea_rs::logging::log_to_file;

// Set up logging to a file
if let Err(e) = log_to_file("app.log", "MyApp") {
    eprintln!("Failed to initialize logging: {}", e);
}

// Now you can use standard log macros
log::info!("Application started");
log::error!("Something went wrong");

Functions§

log_to_file
Set up file logging for the application.