feat: add -v/-vv verbosity flags and trace-level hex dumps
Add clap CLI argument parsing with three log-level controls: -q/--quiet errors only (default) info — connections and value changes -v debug — every packet's cmd/src/flags logged on TX and RX -vv trace — full 32-byte hex dump of every packet on the wire RUST_LOG env var continues to work as a fine-grained override for any of the above levels. Also expand the TX log line to include src and flags fields to match the RX line, making the two symmetric.
This commit is contained in:
+6
-5
@@ -10,8 +10,9 @@ name = "qmk-host"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
hidapi = "2" # Cross-platform Raw HID access
|
||||
anyhow = "1" # Ergonomic error handling
|
||||
log = "0.4" # Logging facade
|
||||
env_logger = "0.11" # Logger implementation (RUST_LOG env var)
|
||||
ctrlc = "3" # Ctrl+C / SIGINT handler
|
||||
hidapi = "2" # Cross-platform Raw HID access
|
||||
anyhow = "1" # Ergonomic error handling
|
||||
log = "0.4" # Logging facade
|
||||
env_logger = "0.11" # Logger implementation (RUST_LOG env var)
|
||||
ctrlc = "3" # Ctrl+C / SIGINT handler
|
||||
clap = { version = "4", features = ["derive"] } # CLI argument parsing
|
||||
|
||||
Reference in New Issue
Block a user