Crates.io | cli-toolbox |
lib.rs | cli-toolbox |
version | 0.8.0 |
source | src |
created_at | 2021-08-03 15:33:34.217827 |
updated_at | 2021-11-06 05:03:36.003171 |
description | Utility library for working with cli output ergonomically |
homepage | https://github.com/Nejat/cli-toolbox-rs |
repository | https://github.com/Nejat/cli-toolbox-rs |
max_upload_size | |
id | 430980 |
size | 65,086 |
Utility library for working with cli
output ergonomically.
This is not a logging alternative, it's intended to produce output for end user consumption.
It handles three levels of verbosity that can be set dynamically at runtime:
debug!
- conditionally compiled console debugging output - [debug
]
report!
- conditional console output according to verbosity level - [debug
|release
]
* debug! is intended to be used during application development
* all other debugging and telemetry output is most likely better served with a logging library
eval!
- conditional code execution according to verbosity level - [debug
|release
]
release!
- conditional code execution according to verbosity level - [release
]
Each macro is gated by a feature.
No feature is mutually exclusive and can be combined as needed.
debug!
macro[dependencies]
cli-toolbox = { version = "0.8", features = ["debug"] }
eval!
macro[dependencies]
cli-toolbox = { version = "0.8", features = ["eval"] }
verbosity = "0.1"
release!
macro[dependencies]
cli-toolbox = { version = "0.8", features = ["release"] }
verbosity = "0.1"
report!
macro[dependencies]
cli-toolbox = { version = "0.8", features = ["report"] }
verbosity = "0.1"
debug!
macroeval!
macrorelease!
macroreport!
macro