diff options
Diffstat (limited to 'doc/svlogd.8.html')
-rw-r--r-- | doc/svlogd.8.html | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/doc/svlogd.8.html b/doc/svlogd.8.html index 50147eb..427147d 100644 --- a/doc/svlogd.8.html +++ b/doc/svlogd.8.html @@ -12,7 +12,7 @@ svlogd - runit’s service logging daemon <h2><a name='sect1'>Synopsis</a></h2> <b>svlogd</b> [-ttv] [-r <i>c]</i> [-R -<i>xyz]</i> [-l <i>n]</i> [-b <i>n]</i> <i>logs</i> +<i>xyz]</i> [-l <i>len]</i> [-b <i>buflen]</i> <i>logs</i> <h2><a name='sect2'>Description</a></h2> <i>logs</i> consists of one or more arguments, each specifying a directory. <p> @@ -21,78 +21,78 @@ standard input, optionally filters log messages, and writes the data to one or more automatically rotated <i>logs</i>. <p> Recent log files can automatically be processed by an arbitrary processor program when they are rotated, and -<b>svlogd</b> can be told to alert selected log messages to standard error. <p> -<b>svlogd</b> -runs until it sees end-of-file on standard input or is sent a TERM signal, -see below. +<b>svlogd</b> can be told to alert selected log messages to standard error, and +through udp. <p> +<b>svlogd</b> runs until it sees end-of-file on standard input or is +sent a TERM signal, see below. <h3><a name='sect3'>Log Directory</a></h3> -A log directory <i>log</i> contains some number of old -log files, and the current log file <i>current</i>. Old log files have a file name -starting with <i>@</i> followed by a precise timestamp (see <i><b>tai64n</b>(8)</i>), indicating -when <i>current</i> was rotated and renamed to this file. <p> -A log directory additionally -contains the lock file <i>lock</i>, maybe <i>state</i> and <i>newstate</i>, and optionally the -file <i>config</i>. <b>svlogd</b> creates necessary files if they don’t exist. <p> -If <b>svlogd</b> -has trouble opening a log directory, it prints a warning, and ignores this -log directory. If <b>svlogd</b> is unable to open all log directories given at -the command line, it exits with an error. This can happen on start-up or -after receiving a HUP signal. +A log directory <i>log</i> contains +some number of old log files, and the current log file <i>current</i>. Old log +files have a file name starting with <i>@</i> followed by a precise timestamp +(see <i><b>tai64n</b>(8)</i>), indicating when <i>current</i> was rotated and renamed to this +file. <p> +A log directory additionally contains the lock file <i>lock</i>, maybe <i>state</i> +and <i>newstate</i>, and optionally the file <i>config</i>. <b>svlogd</b> creates necessary files +if they don’t exist. <p> +If <b>svlogd</b> has trouble opening a log directory, it prints +a warning, and ignores this log directory. If <b>svlogd</b> is unable to open all +log directories given at the command line, it exits with an error. This +can happen on start-up or after receiving a HUP signal. <h3><a name='sect4'>Log File Rotation</a></h3> -<b>svlogd</b> appends selected log -messages to the <i>current</i> log file. If <i>current</i> has <i>size</i> bytes or more size -(or there is a new-line within the last <i>len</i> of <i>size</i> bytes) <i>current</i> is rotated: -<p> -<b>svlogd</b> closes <i>current</i>, changes permission of <i>current</i> to 0755, renames <i>current</i> -to @<i>timestamp.s,</i> and starts with a new empty <i>current</i>. If <b>svlogd</b> sees <i>num</i> -or more old log files in <i>dir</i>, it removes the oldest. +<b>svlogd</b> +appends selected log messages to the <i>current</i> log file. If <i>current</i> has <i>size</i> +bytes or more (or there is a new-line within the last <i>len</i> of <i>size</i> bytes) +<i>current</i> is rotated: <p> +<b>svlogd</b> closes <i>current</i>, changes permission of <i>current</i> +to 0755, renames <i>current</i> to @<i>timestamp.s,</i> and starts with a new empty <i>current</i>. +If <b>svlogd</b> sees <i>num</i> or more old log files in <i>dir</i>, it removes the oldest +one. <h3><a name='sect5'>Processor</a></h3> -If <b>svlogd</b> -is told to process recent log files, it saves <i>current</i> to @<i>timestamp.u,</i> feeds -@<i>timestamp.u</i> through ‘‘sh -c "<i>processor</i>"’’ and writes the output to @<i>timestamp.t.</i> -If the <i>processor</i> finishes successfully, @<i>timestamp.u</i> is deleted and @<i>timestamp.t</i> -is renamed to @<i>timestamp.s,</i> otherwise @<i>timestamp.t</i> is deleted and the <i>processor</i> -is started again. <b>svlogd</b> also saves any output that the <i>processor</i> writes -to file descriptor 5, and make that output available on file descriptor -4 when it runs <i>processor</i> on the next log file rotation. <p> -A <i>processor</i> is run -in the background. If <b>svlogd</b> sees a previously started <i>processor</i> still running -when trying to start a new one for the same <i>log</i>, it blocks until the currently -running <i>processor</i> has finished successfully. Only the HUP signal works in -that situation. Note that this may block any program feeding its log data -to <b>svlogd.</b> +If <b>svlogd</b> is told to process recent log files, it saves <i>current</i> +to @<i>timestamp.u,</i> feeds @<i>timestamp.u</i> through ‘‘sh -c "<i>processor</i>"’’ and writes the +output to @<i>timestamp.t.</i> If the <i>processor</i> finishes successfully, @<i>timestamp.u</i> +is deleted and @<i>timestamp.t</i> is renamed to @<i>timestamp.s,</i> otherwise @<i>timestamp.t</i> +is deleted and the <i>processor</i> is started again. <b>svlogd</b> also saves any output +that the <i>processor</i> writes to file descriptor 5, and makes that output available +on file descriptor 4 when running <i>processor</i> on the next log file rotation. +<p> +A <i>processor</i> is run in the background. If <b>svlogd</b> sees a previously started +<i>processor</i> still running when trying to start a new one for the same <i>log</i>, +it blocks until the currently running <i>processor</i> has finished successfully. +Only the HUP signal works in that situation. Note that this may block any +program feeding its log data to <b>svlogd.</b> <p> <h3><a name='sect6'>Config</a></h3> -On startup, and after receiving a HUP signal, <b>svlogd</b> checks -for each <i>log</i> if the configuration file <i>log/config</i> exists, and if so, reads -the file line by line and adjusts configuration for <i>log</i> as follows: <p> -If -the line is empty, less than two characters long, or starts with a ‘‘#’’, it -is ignored. A line of the form +On startup, and after receiving +a HUP signal, <b>svlogd</b> checks for each <i>log</i> if the configuration file <i>log/config</i> +exists, and if so, reads the file line by line and adjusts configuration +for <i>log</i> as follows: <p> +If the line is empty, less than two characters long, +or starts with a ‘‘#’’, it is ignored. A line of the form <dl> <dt>s<i>size</i> </dt> -<dd>sets the maximum file size of <i>current</i> -when <b>svlogd</b> should rotate the current log file to <i>size</i> bytes. Default is -1000000. If <i>size</i> is zero, <b>svlogd</b> doesn’t rotate log files. You should set -<i>size</i> to at least (2 * <i>len</i>). </dd> +<dd>sets the maximum +file size of <i>current</i> when <b>svlogd</b> should rotate the current log file to +<i>size</i> bytes. Default is 1000000. If <i>size</i> is zero, <b>svlogd</b> doesn’t rotate log +files. You should set <i>size</i> to at least (2 * <i>len</i>). </dd> <dt>n<i>num</i> </dt> -<dd>sets the maximum number of old log files -<b>svlogd</b> should maintain to <i>num</i>. If <b>svlogd</b> sees more that <i>num</i> old log files -in <i>log</i> after log file rotation, it deletes the oldest one. Default is 10. -</dd> +<dd>sets the maximum number +of old log files <b>svlogd</b> should maintain to <i>num</i>. If <b>svlogd</b> sees more that +<i>num</i> old log files in <i>log</i> after log file rotation, it deletes the oldest +one. Default is 10. </dd> <dt>!<i>processor</i> </dt> -<dd>tells <b>svlogd</b> to feed each recent log file through <i>processor</i> -(see above) on log file rotation. By default log files are not processed. -</dd> +<dd>tells <b>svlogd</b> to feed each recent log file +through <i>processor</i> (see above) on log file rotation. By default log files +are not processed. </dd> <dt>u<i>a.b.c.d[:port]</i> </dt> -<dd>tells <b>svlogd</b> to transmit the first <i>len</i> characters of selected -log messages to the IP address <i>a.b.c.d</i>, port number <i>port</i>. If <i>port</i> isn’t set, -the default port for syslog is used (514). <i>len</i> can be set through the -l -option, see below. If <b>svlogd</b> has trouble sending udp packets, it writes +<dd>tells <b>svlogd</b> to transmit the first <i>len</i> characters +of selected log messages to the IP address <i>a.b.c.d</i>, port number <i>port</i>. If <i>port</i> +isn’t set, the default port for syslog is used (514). <i>len</i> can be set through +the -l option, see below. If <b>svlogd</b> has trouble sending udp packets, it writes error messages to the log directory. Attention: logging through udp is unreliable, and should be used in private networks only. </dd> |