From 09431c14a812b96d6b1fabce736eeb78d1de4b31 Mon Sep 17 00:00:00 2001 From: IceDynamix <22303902+IceDynamix@users.noreply.github.com> Date: Mon, 18 Mar 2024 02:30:36 +0100 Subject: [PATCH] update readme with logging instructions --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index dedfd63..1a5733a 100644 --- a/README.md +++ b/README.md @@ -24,18 +24,24 @@ Arguments: [OUTPUT] Path to output .json file to [default: archive_output.json] Options: - --pcap Read packets from .pcap file instead of capturing live packets - --timeout How long to wait in seconds until timeout is triggered (for live capture) [default: 120] - -v, --verbose... How verbose the output should be, can be set up to 3 times. Has no effect if RUST_LOG is set - -h, --help Print help + --pcap Read packets from .pcap file instead of capturing live packets + --timeout How long to wait in seconds until timeout is triggered (for live capture) [default: 120] + -v, --verbose... How verbose the output should be, can be set up to 3 times. Has no effect if RUST_LOG is set + -l, --log-path Path to output log to + -h, --help Print help ``` -optionally set `RUST_LOG` env variable to customize logging, see [here](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives) +to customize logging, either +- set the verbose flags +- or set `RUST_LOG` env variable to customize logging, see [here](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives) + +to output logs to a file, provide `--log-path `. file logs will always be trace-level. ## build from source - follow instructions [here](https://github.com/rust-pcap/pcap?tab=readme-ov-file#building) - - for me on windows, adding the `Packet.lib` and `wpcap.lib` from the sdk to this directory was enough to link successfully + - for me on windows, adding the `Packet.lib` and `wpcap.lib` from the sdk (check the x64 or arm dir) + to this directory was enough to link successfully - `cargo build` / `cargo run` ## library