Loggerithm
Logging Library
Installation
# Cargo.toml
[]
= "1"
Preparation
At the top of each module that logs text, you must add one of the following:
use logger;
// This will tell the module to use the logger from the parent module.
// If there is no parent module, it will use the default logger.
logger!;
use logger;
logger!;
Basic Logging
Loggerithm provides the standard logging levels, plus TRACE NOTICE SUCCESS and FAILURE.
The log! macro is similar to the format! macro, but takes a logging level as the first argument.
use ;
use ;
logger!;
See examples/basic_logging.rs.
Custom Logging Levels
use ;
use INFO;
logger!;
log_level!;
See examples/custom_level.rs and examples/custom_level_formatting.rs.
Custom Logger
use ;
use ;
logger!;
See examples/custom_logger.rs
Modules
See examples/module_tree.rs for information on how loggers work across modules.