5 releases (2 stable)

1.0.1 Jan 8, 2021
1.0.0 Jan 3, 2020
0.2.1 Jul 26, 2019
0.2.0 Apr 24, 2019
0.1.0 Mar 5, 2019

#723 in Debugging

Download history 29/week @ 2024-07-15 67/week @ 2024-07-22 40/week @ 2024-07-29 30/week @ 2024-08-05 23/week @ 2024-08-12 16/week @ 2024-08-19 40/week @ 2024-08-26 50/week @ 2024-09-02 14/week @ 2024-09-09 27/week @ 2024-09-16 44/week @ 2024-09-23 61/week @ 2024-09-30 2/week @ 2024-10-07 33/week @ 2024-10-14 32/week @ 2024-10-21 39/week @ 2024-10-28

110 downloads per month
Used in 5 crates

MIT/Apache

19KB
134 lines

tao-log

Rustdoc Change Log Crates.io CI Status deps status

Extension macros for output to the rust log crate

Most notably this includes a set of -v suffix macros (e.g. debugv!) that provide a superset of the std::dbg! feature.

“Why write an RFC, when you can just write code?” — 老子 (“Old Master”), 557 BCE

This unenlightened wanderer (游侠) wrote a log crate PR and RFC 317: Inline Expression and Value Logging, before publishing the work as this standalone crate.

See the rustdoc for usage details.

Minimum supported rust version

MSRV := 1.32.0

The crate will fail fast on any lower rustc (via a build.rs version check) and is also CI tested on this version, included both 2015 and 2018 edition external macro imports. A PR would be considered to backport the project to earlier rust versions, possibly as far back as 1.16.0 (log's current MSRV). Or consider lobbying for the inclusion of this feature in log itself.

Compile time errors for misuse of -v macros (e.g. 0 arguments, 4 arguments, non-literal prefix argument, missing format specifier, etc.) are tested and verified on rustc stable and nightly, currently. Earlier rustc versions, prior to 1.35.0, may produce less clear errors.

License

This project is dual licensed under either of following:

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in tao-log by you, as defined by the Apache License, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~87KB