-
Notifications
You must be signed in to change notification settings - Fork 3
/
drlog.8
105 lines (105 loc) · 3.75 KB
/
drlog.8
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
.\" Man page generated from reStructuredText.
.
.TH DRLOG 8 "" "" ""
.SH NAME
drlog \- Read lines from stdin and append them to auto-rotated logs
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.sp
\fBdrlog [options] directory\fP
.SH DESCRIPTION
.sp
\fBdrlog\fP will read its standard input, distributing it as output in a set
of named \fBlog\-YYYY\-mm\-dd\-HH:MM:SS\fP and a \fBcurrent\fP file. Output is always
appended to \fBcurrent\fP, but when user\-defined maximum file size (\fB\-s\fP) or
file usage time (\fB\-t\fP) it will be renamed with a timestamp in its file name,
a new \fBcurrent\fP file will be opened and, if there are stored more than
a number of timestamped files (\fB\-m\fP) old ones will be deleted.
.sp
The names of the files are designed to make them appear time\-ordered in
output from commands like \fIls(1)\fP\&. Also, the \fBcurrent\fP file will appear at
the top of file listings.
.sp
If \fBdrlog\fP receives a \fITERM\fP signal, it will read and process data until
the next newline and then exit, leaving \fIstdin\fP at the first byte of data it
has not yet precessed.
.sp
Upon a \fBHUP\fP signal, \fBdrlog\fP will close and re\-open the \fBcurrent\fP
log file, just in case you want rotate logs using an external tool, though
using it that way is unsupported.
.SH USAGE
.sp
Command line options:
.INDENT 0.0
.TP
.BI \-m \ NUMBER\fR,\fB \ \-\-max\-files \ NUMBER
Maximum amount of maintained log files. When \fBdrlog\fP sees
more than \fINUMBER\fP log files in the log \fIdirectory\fP it will
remove the oldest log file.
.TP
.BI \-T \ TIME\fR,\fB \ \-\-max\-time \ TIME
Maximum number of time to use a log file. Once \fBdrlog\fP spends
more than \fITIME\fP using a log file it will start writing to a new
one. Suffixes \fIm\fP (minutes), \fIh\fP (hours), \fId\fP (days), \fIw\fP (weeks),
\fIM\fP (months) and \fIy\fP (years) may be used after the number. If no
suffix is given, it is assummed that \fITIME\fP is in seconds.
.TP
.BI \-s \ SIZE\fR,\fB \ \-\-max\-size \ SIZE
Maximum size of each log file. When a log file grows over
\fISIZE\fP then \fBdrlog\fP will rotate logs and open a new one.
Suffixes \fIk\fP (kilobytes), \fIm\fP (megabytes) and \fIg\fP (gigabytes)
may be used after the number. If no suffix is given, it is
assumed that \fBSIZE\fP is in bytes.
.TP
.BI \-i \ NUMBER\fR,\fB \ \-\-input\-fd \ NUMBER
Use file descriptor \fBNUMBER\fP to read input. By default the
standard input descriptor (number \fB0\fP) is used.
.TP
.B \-b\fP,\fB \-\-buffered
Buffered operation. If enabled, calls to \fIfsync(2)\fP will be
avoided. This improves performance, but may cause messages to
be lost.
.TP
.B \-t\fP,\fB \-\-timestamp
Prepend a timestamp to each line. The timestamp format
is \fBYYYY\-mm\-dd/HH:MM:SS\fP, following that of rotated log files.
It is easy to parse and sort. And human\-readable, too.
.TP
.B \-e\fP,\fB \-\-skip\-empty
Ignore empty input lines. An empty line is one that does not
contain any characters; a line which contains whitespace is
\fBnot\fP considered empty.
.UNINDENT
.SH SEE ALSO
.sp
\fImultilog(8)\fP, \fIsupervise(8)\fP, \fIsvc(8)\fP, \fIdslog(8)\fP, \fIdlog(8)\fP, \fIdmon(8)\fP
.SH AUTHOR
Adrian Perez <[email protected]>
.\" Generated by docutils manpage writer.
.