ufwlog 0.3.0-beta.4

A library to parse, format and export ufw log.
Documentation

ufwlog

Crates.io Version

A program to parse, format and export ufw log.

Please see here for CLI README.

Installation

cargo install ufwlog

Usage

The UfwLog struct is a parsed log record. You can use it to filter, export, etc.

See quick start part to get started, or docs.rs for full API docs.

Reporting

Because reference of UFW log is too few and some difference between version, config, etc. this program may have something uncovered.

If you find any problem, just create an issue with original log.

You can de-identification original log content, but keep type. Otherwise, it will make me make mistake judgment. For example, if a new field FID=5232 changed to FID=XXXX when reporting, I will add FID as string because of X char. In this case, you can change record to FID=1234 because data type is same as origin log.

Developing

cargo fmt
cargo clippy

run test:

cargo test --workspace # all
cargo test -p ufwlog # library
cargo test -p ufwlog-cli # binary

Check workspace struct:

cargo tree --workspace

Also, you can use prek to check code/files before committing:

prek install # install pre-commit hooks
prek run # run all hooks

Library

cargo check --lib

Binary

cargo run -p ufwlog-cli -- [parameters]

or use alias rc (abbreviation of run cli):

cargo rc -- [parameters]

LICENSE

MPL 2.0