Crates.io | cu29-log-derive |
lib.rs | cu29-log-derive |
version | |
source | src |
created_at | 2024-07-29 18:30:56.153112 |
updated_at | 2024-12-05 22:12:25.670392 |
description | This is part of the text logging macros Copper. It cannot be used independently from the copper project. |
homepage | https://github.com/copper-project |
repository | https://github.com/copper-project/copper-rs |
max_upload_size | |
id | 1319099 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
The cu29_log_derive
crate provides macros like !debug
to enable structured logging, allowing you to efficiently log
data in
a binary format.
debug!("This string won't be stored nor interpreted on the robot", myvaluename = 42);
Instead of storing the complete formatted string in a log file, this macro captures a unique identifier for the format string and parameter names, then logs the values in a compact bincode format. This approach significantly improves logging efficiency.
If you are using this crate as part of a Copper project, no additional setup is required. The logs will automatically
integrate with the Unified Logger (cu29_unifiedlog
), storing logs in the binary format.
For those using this crate independently of Copper, follow the example setup provided in cu_standalone_structlog to configure your logger.
You can extract and view your logs using either Rust or Python: