-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
d[sr]log: Add --skip-empty/-e command line option
Add a new --skip-empty/-e command line option which can be used to discard empty input lines. By default empty input lines are copied over to the output log.
- Loading branch information
Showing
9 changed files
with
70 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.\" Man page generated from reStructeredText. | ||
.\" Man page generated from reStructuredText. | ||
. | ||
.TH DLOG 8 "" "" "" | ||
.SH NAME | ||
|
@@ -44,31 +44,36 @@ output. The latter may be useful to add timestamps in shell pipelines. | |
Command line options: | ||
.INDENT 0.0 | ||
.TP | ||
.BI \-p \ TEXT, \ \-\-prefix \ TEXT | ||
.BI \-p \ TEXT\fR,\fB \ \-\-prefix \ TEXT | ||
Insert the given text as prefix for each logged message. If | ||
adding timestamps is enabled, the text is inserted \fIafter\fP | ||
the timestamp, but still before the logged text. | ||
.TP | ||
.BI \-i \ NUMBER, \ \-\-input\-fd \ NUMBER | ||
.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, \-\-buffered | ||
.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, \-\-timestamp | ||
.B \-t\fP,\fB \-\-timestamp | ||
Prepend a timestamp to each saved line. By default | ||
timestamps are disabled. Timestamp format is | ||
\fBYYYY\-mm\-dd/HH:MM:SS\fP. | ||
\fBYYYY\-mm\-dd/HH:MM:SS\fP\&. | ||
.TP | ||
.B \-h, \-\-help | ||
.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. | ||
.TP | ||
.B \-h\fP,\fB \-\-help | ||
Show a summary of available options. | ||
.UNINDENT | ||
.sp | ||
Albeit it can be used stan\-alone, most of the time you will be running | ||
\fBdlog\fP under a process control tool like \fIdmon(8)\fP or \fIsupervise(8)\fP. | ||
\fBdlog\fP under a process control tool like \fIdmon(8)\fP or \fIsupervise(8)\fP\&. | ||
.SH ENVIRONMENT | ||
.sp | ||
Additional options will be picked from the \fBDLOG_OPTIONS\fP environment | ||
|
@@ -83,5 +88,4 @@ given in the command line, so they may still be overriden. | |
.SH AUTHOR | ||
Adrian Perez <[email protected]> | ||
.\" Generated by docutils manpage writer. | ||
.\" | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.\" Man page generated from reStructeredText. | ||
.\" Man page generated from reStructuredText. | ||
. | ||
.TH DRLOG 8 "" "" "" | ||
.SH NAME | ||
|
@@ -43,7 +43,7 @@ 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 | ||
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 | ||
|
@@ -58,44 +58,48 @@ using it that way is unsupported. | |
Command line options: | ||
.INDENT 0.0 | ||
.TP | ||
.BI \-m \ NUMBER, \ \-\-max\-files \ NUMBER | ||
.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, \ \-\-max\-time \ TIME | ||
.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, \ \-\-max\-size \ SIZE | ||
.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, \ \-\-input\-fd \ NUMBER | ||
.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, \-\-buffered | ||
.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, \-\-timestamp | ||
.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. | ||
.\" | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.\" Man page generated from reStructeredText. | ||
.\" Man page generated from reStructuredText. | ||
. | ||
.TH DLOG 8 "" "" "" | ||
.SH NAME | ||
|
@@ -43,30 +43,35 @@ program name. | |
Command line options: | ||
.INDENT 0.0 | ||
.TP | ||
.BI \-p \ PRIORITY, \ \-\-priority \ PRIORITY | ||
.BI \-p \ PRIORITY\fR,\fB \ \-\-priority \ PRIORITY | ||
Priority of messages. Refer to \fIsyslog(3)\fP to see possible | ||
values. Just pass any valid priority without the \fBLOG_\fP | ||
prefix. Case does not matter. | ||
.TP | ||
.BI \-f \ FACILITY, \ \-\-facility \ FACILITY | ||
.BI \-f \ FACILITY\fR,\fB \ \-\-facility \ FACILITY | ||
Logging facility. Refer to \fIsyslog(3)\fP to see possible values. | ||
Just pass any valid facility without the \fBLOG_\fP prefix. Case | ||
does not matter. | ||
.TP | ||
.BI \-i \ NUMBER, \ \-\-input\-fd \ NUMBER | ||
.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 \-c, \-\-console | ||
.B \-c\fP,\fB \-\-console | ||
If a message cannot be sent to the system logger, print a copy | ||
of it to the system console. | ||
.TP | ||
.B \-h, \-\-help | ||
.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. | ||
.TP | ||
.B \-h\fP,\fB \-\-help | ||
Show a summary of available options. | ||
.UNINDENT | ||
.sp | ||
Albeit it can be used stan\-alone, most of the time you will be running | ||
\fBdslog\fP under a process control tool like \fIdmon(8)\fP or \fIsupervise(8)\fP. | ||
\fBdslog\fP under a process control tool like \fIdmon(8)\fP or \fIsupervise(8)\fP\&. | ||
.SH ENVIRONMENT | ||
.sp | ||
Additional options will be picked from the \fBDSLOG_OPTIONS\fP environment | ||
|
@@ -81,5 +86,4 @@ given in the command line, so they may still be overriden. | |
.SH AUTHOR | ||
Adrian Perez <[email protected]> | ||
.\" Generated by docutils manpage writer. | ||
.\" | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters