Linux command
logmerger 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Merge and view log files
logmerger [file1.log] [file2.log]
Merge logs inline
logmerger --inline [file1.log] [file2.log]
Merge logs within a time window
logmerger --start "[timestamp]" --end "[timestamp]" [file1.log] [file2.log]
Write merged output
logmerger -o [output.log] [file1.log] [file2.log]
说明
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.
参数
- --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.
FAQ
What is the logmerger command used for?
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.
How do I run a basic logmerger example?
Run `logmerger [file1.log] [file2.log]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --inline do in logmerger?
Output merged logs to stdout instead of the TUI.