MHlog
MHlog is a simple, thread-safe logging library.
Usage
[]
= "2.1.0"
extern crate mhlog;
use ;
log!;
info!;
warn!;
err!;
Writes log messages to stdout/stderr. The writes are thread-safe.
If an error occurs when writing to the log file it panics.
Provided logging macros:
log!()info!()warn!()err!()
Features
Writing to stdout
By default all log messages are printed to stderr. To make log!() and info!() print to stdout instead, enable the log2stdout feature.
[]
= { = "*", = ["log2stdout"] }
Coloured log messages
Coloured log messages can be enabled with the colours feature.
[]
= { = "*", = ["colours"] }
Changelog
v2.1.2
- Bugfix
v2.1.1
- Update crate documentation.
v2.1.0
- Log all messages to stderr by default. Can be disabled with feature
log2stdout. - Add support for coloured log messages with
colouredfeature.
v2.0.0
- Even simpler interface
- Reduced interface to only
err,warn,info, andlog - No writing to file, only stdout (should pipe log output instead)
v1.1.0
- Add support for verbose logging messages
v1.0.1
- Added example