Registry / logging / log-derive

log-derive

JSON →
library0.4.1rscratesunverified

Procedural Macros for logging the result and inputs of a function.

# Cargo.toml [dependencies] log-derive = "0.4.1"
INSTALL
IMPORT
SIG · LOG-DERIVE
L
log-derive
loggingrustv0.4.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.

logfn
use log_derive::logfn;

Automatically log function inputs and outputs.

use log_derive::logfn; #[logfn(INFO)] fn add(a: i32, b: i32) -> i32 { a + b } fn main() { add(2, 3); }
Debug
Known issues
gotchaRequires the `log` crate to be in scope
fix
Add `log` as a dependency and initialize a logger (e.g., env_logger)
affects: >=0.4.0
Upgrade
Version history
0.4.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
31 hits · last 30 days
node
28
Amazon
1
OpenAI (training)
1
Resources
log-derive — cargo add log-derive · libregistry