about summary refs log tree commit diff
path: root/README
blob: 401a32ca796a5c1d96ea7a499e698d98aa9e6608 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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