log-easy 0.2.0

Easy to use file logger with log levels and global logging macros.
Documentation
//! Easy-to-use file logger that writes messages in **log-easy-style**.
//!
//! ## Format
//! Each entry is written as:
//!
//! ```text
//! [YYYY-MM-DD HH:MM:SS][LOG_LEVEL] Message
//! ```
//!
//! ## Example
//! ```rust,no_run
//! use log_easy::{Logger, LogLevel};
//!
//! let logger = Logger::new("app.log").with_level(LogLevel::Info);
//! logger.info("Application started");
//! logger.error("An error occurred");
//! ```
//!
//! ## Global macros
//! ```rust,no_run
//! use log_easy::{error, info, init_with, Logger, LogLevel};
//!
//! init_with(Logger::new("app.log").with_level(LogLevel::Info)).unwrap();
//! info!("Application started");
//! error!("An error occurred");
//! ```
//!
//! ## Error handling
//! The convenience methods (`info`, `warn`, etc.) are **non-intrusive** and never return errors.
//! If a write fails, the logger prints a message to stderr.
//!
//! If you need to handle errors explicitly, use the `try_*` methods (e.g. `try_info`).

mod logger;
#[macro_use]
mod macros;

pub use logger::{LogLevel, Logger, init, init_with};

/// Used by macros to access the global logger
#[doc(hidden)]
pub fn global_logger() -> Option<&'static Logger> {
    logger::global()
}