about summary refs log tree commit diff
MLOG(1)                     General Commands Manual                    MLOG(1)

NAME
     mlog – merge log files by timestamp

SYNOPSIS
     mlog [-f] [-s] [-u] [-n lines] [files ...]

DESCRIPTION
     mlog reads lines from multiple log files and prints them in chronological
     order.  The lines in the files need to start with lexicographically
     comparable timestamps.  mlog prints the oldest line first, thus
     preserving relative order.

     mlog behaves like a combination of ‘sort -m’ and ‘tail -f’.

     The options are as follows:

     -f      Follow the output files, output appended lines as file grows.
             When the file is truncated or recreated, start from beginning.
             With two -f flags, seek to the end of files on start and only
             print fresh lines.

     -n N    Only print the last N lines of each file (default: all lines).

     -s      Strip a prefix generated by socklog(8) from each line, which have
             a format like ‘facility.priority: timestamp’.

     -u      Only print unique lines.  If other files contain the same line at
             the current position, skip them.

EXIT STATUS
     The mlog utility exits 0 on success, and >0 if an error occurs.

INTERNALS
     On Linux, inotify(7) is used to detect file changes.

SEE ALSO
     tail(1), sort(1), svlogd(8)

AUTHORS
     Leah Neukirchen <leah@vuxu.org>

LICENSE
     mlog is in the public domain.

     To the extent possible under law, the creator of this work has waived all
     copyright and related or neighboring rights to this work.

     http://creativecommons.org/publicdomain/zero/1.0/

Void Linux                     January 14, 2024                     Void Linux