togglog 0.1.0

A compile-time toggle wrapper for the log crate
Documentation
  • Coverage
  • 93.33%
    14 out of 15 items documented0 out of 0 items with examples
  • Size
  • Source code size: 16.64 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.17 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • recatek/togglog
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • recatek

togglog

A compile-time toggle wrapper for the log crate.

Add togglog to your dependencies as if it was the log crate:

[dependencies]
log = { version = "0.1", package = "togglog" }

and enable it via features:

[features]
enable_log = ["log/enabled"]

then, in your code, use log macros normally:

if bad_thing {
    log::error!("bad thing!");
}

To compile out all logging, disable the log/enabled feature.

License

This library may be used under your choice of the Apache 2.0 or MIT license.