Crate az_logger

Source
Expand description

§az_logger

az_logger is a minimal and thread-safe logger for Rust applications. It provides easy-to-use logging macros, optional file output, colored terminal output, and configurable verbosity and filtering. I’m not expecting anyone to download this, as I’ll be using it mostly for my Malware Development projects.

§Example

use az_logger::{Logger, LoggerOptions, info};
Logger::init(Some("log.txt"), LoggerOptions::default()).unwrap();
info!("Application started!");

Modules§

macros

Macros§

critical
Logs a critical-level message.
debug
Logs a debug-level message.
error
Logs an error-level message.
info
Logs an info-level message.
success
Logs a success-level message.
warn
Logs a warning-level message.

Structs§

ColoredString
Re-exporting color so that users can specify custom colors A string that may have color and/or style applied to it.
LogEntry
Represents a single log entry with metadata.
LogFormatStyle
Configuration for a log message’s text style.
LogFormatStyles
Optional custom style configuration for each log level.
Logger
A globally accessible, thread-safe logger.
LoggerOptions
Configuration options for the global logger instance.
Style
Re-exporting color so that users can specify custom colors A combinatorial style such as bold, italics, dimmed, etc.

Enums§

Color
Re-exporting color so that users can specify custom colors The 8 standard colors.
LogLevel
Severity level of a log entry.

Functions§

expand_log_name_fmt
Re-exporting for tests Expands a log file name format string into a concrete file name using the current timestamp and executable name.