Registry / logging / fern
library0.7.1rscratesunverified

Simple, efficient logging for Rust.

# Cargo.toml [dependencies] fern = "0.7.1"
INSTALL
IMPORT
SIG · FERN
F
fern
loggingrustv0.7.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Dispatch
✓ use fern::Dispatch;

Sets up a basic logger that outputs to stdout with a custom format.

use fern::Dispatch; fn main() { Dispatch::new() .format(|out, message, record| out.finish(format_args!("[{}] {}", record.level(), message))) .chain(std::io::stdout()) .apply() .unwrap(); log::info!("Hello, world!"); }
Debug
Known issues
gotchaRequires the `log` crate as a dependency to use logging macros.
fix
Add `log` to your Cargo.toml dependencies.
affects: >=0.7.0
Upgrade
Version history
0.7.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
34 hits · last 30 days
node
30
Resources
fern — cargo add fern · libregistry