Skip to content
Draft
51 changes: 32 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion check/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,12 @@ log = "0.4.20"
tokio = { version = "1.44.2", default-features = false, features = ["fs", "signal", "process", "rt-multi-thread"] }
pcap-file-tokio = "0.1.0"
clap = { version = "4.5.2", features = ["derive"] }
simple_logger = "5.0.0"
walkdir = "2.5.0"
serde_json = "1.0.145"
serde = "1.0.228"
chrono = "0.4.42"

[dependencies.simple_logger]
version = "5.0.0"
# Log to stderr so that report output doesn't potentially collide with system logs
features = ["stderr"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you document here why it has to be stderr?

Copy link
Contributor Author

@adrienthebo adrienthebo Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's no longer strictly necessary to log to stderr; my original implementation printed json to stdout for simplicity but since --path supports both files and directories we have to write .ndjson files in order to have a coherent output that matches the daemon ndjson output.

My instinct is to revert this change and continue logging to stdout so that check ... | less will work as expected, but I don't have strong feelings either way. I'll document why we made this change if you want to continue with the switch to stderr.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think logging to stderr is still the right thing to do, just asking about documentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amended in b877ce4.

Loading