Rotated server logs are often compressed, and one request often passes through several services. Marlin opens compressed logs directly and merges several logs into one timeline.
Open a Compressed Log
Open a .gz or .xz file as you open any file: ⌘O, Open Quickly, the file tree, or a drag onto the window. Marlin reads the first bytes of the file, so the extension does not matter.
Marlin decompresses the file into a read-only tab. The notice shows the progress, then the name and the size of the result. Search, Timeline, Columns and the pipeline work on the decompressed text. A second open of the same file is instant.
Formats and Storage
Marlin reads gzip, including files made of several gzip members, and xz. bzip2 files are not supported.
The decompressed copies are kept in Marlin's cache folder. Marlin clears them at each launch, and Settings > Privacy lists them with their size.
Merge Logs by Time (⌥⌘M)
Choose File > Merge Logs by Time… or press ⌥⌘M, then select two to sixteen log files. Compressed logs are decompressed first.
The merged log opens as a read-only tab named after its sources, for example nginx + app + worker (merged).log. The notice reports the number of lines from each source and the time the merge took.
How Lines Are Ordered
Every line is put in order by its timestamp. A line without a timestamp, such as a stack trace, stays under the line above it in the same file. When two lines have the same timestamp, they keep the order of the files you chose.
Each line starts with its source in square brackets, for example [nginx.log].
Filter One Source
To see one source, add a Match step with Contains and the tag, for example [app.log]. Timeline, Columns and the pipeline all work on the merged log.