#merge

app logs-narrator

Merge logs to tell a story

1 unstable release

0.4.0 Mar 14, 2024

#1570 in Command line utilities

Apache-2.0

435KB
234 lines

logs-narrator

Merge log files according to the timestamps to display the logs in a chronological order.

Alternative to lnav where an additional host id can be extracted via a regex for logs correlation.

example

Disclaimer

This tool has not been tested outside my personal use case and is absolutely NOT production ready!

Feel free to open an issue if you encounter any problem.

Usage

Options:
  -p, --path <PATH>
          Path to the log files
      --id-detection-regex <ID_DETECTION_REGEX>
          Regex to extract an identifier to color logs [default: "(?:newRaft, raft_id: )(\\d+)"]
      --no-color
          Whether to color the output
      --date-format <DATE_FORMAT>
          Date format to use [default: %Y-%m-%dT%H:%M:%S%.6f%Z]
  -h, --help
          Print help
  -V, --version
          Print version

Installation

Releases

Using the provided binaries in https://github.com/agourlay/logs-narrator/releases

Crates.io

Using Cargo via crates.io.

cargo install logs-narrator

Dependencies

~4–15MB
~145K SLoC