LinuxCommandLibrary

logmerger

View multiple log files with merged timeline

TLDR

Merge and view log files interactively
$ logmerger [file1.log] [file2.log]
copy
Merge logs inline to stdout
$ logmerger --inline [file1.log] [file2.log]
copy
Merge logs within a time window
$ logmerger --start "[timestamp]" --end "[timestamp]" [file1.log] [file2.log]
copy
Write merged output to a file
$ logmerger -o [output.log] [file1.log] [file2.log]
copy

SYNOPSIS

logmerger [options] files...

DESCRIPTION

logmerger is a TUI utility for viewing a merged display of multiple log files, correlated by timestamp. It supports compressed text log files (.gz), CSV files, and has experimental support for packet capture files.
Log entries from various files are sorted by their timestamps and presented in a unified, color-coded display where each file gets a distinct color for easy identification.

PARAMETERS

--inline

Output merged logs to stdout instead of the TUI.
-o, --output FILE
Write merged output to a file.
--start TIMESTAMP
Start time for filtering log entries.
--end TIMESTAMP
End time for filtering log entries.

CAVEATS

Relies on consistent timestamp formats across log files for accurate merging. Log files without timestamps cannot be merged.

HISTORY

logmerger was created by ptmcg and is written in Python.

SEE ALSO

lnav(1), tail(1), sort(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard