| Crates.io | armature-log |
| lib.rs | armature-log |
| version | 0.1.0 |
| created_at | 2025-12-26 19:44:19.392392+00 |
| updated_at | 2025-12-26 19:44:19.392392+00 |
| description | Logging utilities for the Armature framework |
| homepage | https://pegasusheavy.github.io/armature |
| repository | https://github.com/pegasusheavy/armature |
| max_upload_size | |
| id | 2006150 |
| size | 47,578 |
Logging utilities for the Armature framework.
ARMATURE_* env vars[dependencies]
armature-log = "0.1"
use armature_log::{info, debug, error};
fn main() {
// Uses ARMATURE_DEBUG and ARMATURE_LOG_LEVEL env vars
armature_log::init();
info!("Application started");
debug!("Debug message");
error!("Something went wrong");
}
| Variable | Values | Default |
|---|---|---|
ARMATURE_DEBUG |
1, true |
false |
ARMATURE_LOG_LEVEL |
trace, debug, info, warn, error |
info |
ARMATURE_LOG_FORMAT |
json, pretty, compact |
json |
ARMATURE_LOG_COLOR |
1, true |
auto-detect TTY |
use armature_log::{configure, Format, Level};
configure()
.format(Format::Pretty)
.level(Level::Debug)
.color(true)
.apply();
// Development: Pretty, Debug, Colors
armature_log::preset_development();
// Production: JSON, Info, No colors
armature_log::preset_production();
MIT OR Apache-2.0