fake-log 0.1.0

A fake logging implementation with the same interface as log crate but with no-op implementation for embedded scenarios
//! Basic usage example of fake-log
//!
//! This example demonstrates the basic usage of fake-log macros.
//! All log calls will be compiled away and produce no output.

use fake_log::{debug, error, info, trace, warn};

fn main() {
    println!("=== fake-log Basic Example ===");
    println!("Note: All log statements below will be silently ignored (no output)");
    println!();

    // Basic logging examples
    error!("This is an error message");
    warn!("This is a warning message");
    info!("This is an info message");
    debug!("This is a debug message");
    trace!("This is a trace message");

    // Logging with formatting
    let user_id = 12345;
    let username = "alice";
    info!("User {} (ID: {}) logged in", username, user_id);

    // Logging with target
    info!(target: "auth", "Authentication successful for user {}", username);
    debug!(target: "database", "Query executed in {} ms", 42);

    // Complex formatting
    let items = vec!["item1", "item2", "item3"];
    debug!("Processing {} items: {:?}", items.len(), items);

    // Error handling example
    let result: Result<i32, &str> = Err("Something went wrong");
    match result {
        Ok(value) => info!("Operation successful: {}", value),
        Err(e) => error!("Operation failed: {}", e),
    }

    println!("Program completed successfully!");
    println!("(Notice: No log output was produced above despite all the log! calls)");
}