Skip to content

Commit

Permalink
update readme with logging instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
IceDynamix committed Mar 18, 2024
1 parent 565376b commit 09431c1
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,24 @@ Arguments:
[OUTPUT] Path to output .json file to [default: archive_output.json]
Options:
--pcap <PCAP> Read packets from .pcap file instead of capturing live packets
--timeout <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 <PCAP> Read packets from .pcap file instead of capturing live packets
--timeout <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 <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 <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
Expand Down

0 comments on commit 09431c1

Please sign in to comment.