+/*
+Config files
+
+On startup, and after receiving a HUP signal, svlogd checks for each
+log directory log if the configuration file log/config exists,
+and if so, reads the file line by line and adjusts configuration
+for log as follows:
+
+If the line is empty, or starts with a #, it is ignored. A line
+of the form
+
+ssize
+ sets the maximum file size of current when svlogd should rotate
+ the current log file to size bytes. Default is 1000000.
+ If size is zero, svlogd doesnt rotate log files
+ You should set size to at least (2 * len).
+nnum
+ sets the number of old log files svlogd should maintain to num.
+ If svlogd sees more that num old log files in log after log file
+ rotation, it deletes the oldest one. Default is 10.
+ If num is zero, svlogd doesnt remove old log files.
+Nmin
+ sets the minimum number of old log files svlogd should maintain
+ to min. min must be less than num. If min is set, and svlogd
+ cannot write to current because the filesystem is full,
+ and it sees more than min old log files, it deletes the oldest one.
+ttimeout
+ sets the maximum age of the current log file when svlogd should
+ rotate the current log file to timeout seconds. If current
+ is timeout seconds old, and is not empty, svlogd forces log file rotation.
+!processor
+ tells svlogd to feed each recent log file through processor
+ (see above) on log file rotation. By default log files are not processed.
+ua.b.c.d[:port]
+ tells svlogd to transmit the first len characters of selected
+ log messages to the IP address a.b.c.d, port number port.
+ If port isnt set, the default port for syslog is used (514).
+ len can be set through the -l option, see below. If svlogd
+ 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.
+Ua.b.c.d[:port]
+ is the same as the u line above, but the log messages are no longer
+ written to the log directory, but transmitted through udp only.
+ Error messages from svlogd concerning sending udp packages still go
+ to the log directory.
+pprefix
+ tells svlogd to prefix each line to be written to the log directory,
+ to standard error, or through UDP, with prefix.
+
+If a line starts with a -, +, e, or E, svlogd matches the first len characters
+of each log message against pattern and acts accordingly:
+
+-pattern
+ the log message is deselected.
++pattern
+ the log message is selected.
+epattern
+ the log message is selected to be printed to standard error.
+Epattern
+ the log message is deselected to be printed to standard error.
+
+Initially each line is selected to be written to log/current. Deselected
+log messages are discarded from log. Initially each line is deselected
+to be written to standard err. Log messages selected for standard error
+are written to standard error.
+
+Pattern Matching
+
+svlogd matches a log message against the string pattern as follows:
+
+pattern is applied to the log message one character by one, starting
+with the first. A character not a star (*) and not a plus (+) matches itself.
+A plus matches the next character in pattern in the log message one
+or more times. A star before the end of pattern matches any string
+in the log message that does not include the next character in pattern.
+A star at the end of pattern matches any string.
+
+Timestamps optionally added by svlogd are not considered part
+of the log message.
+
+An svlogd pattern is not a regular expression. For example consider
+a log message like this
+
+2005-12-18_09:13:50.97618 tcpsvd: info: pid 1977 from 10.4.1.14
+
+The following pattern doesnt match
+
+-*pid*
+
+because the first star matches up to the first p in tcpsvd,
+and then the match fails because i is not s. To match this
+log message, you can use a pattern like this instead
+
+-*: *: pid *
+*/
+
+//usage:#define svlogd_trivial_usage
+//usage: "[-ttv] [-r C] [-R CHARS] [-l MATCHLEN] [-b BUFLEN] DIR..."
+//usage:#define svlogd_full_usage "\n\n"
+//usage: "Continuously read log data from stdin and write to rotated log files in DIRs"
+//usage: "\n"
+//usage: "\n""DIR/config file modifies behavior:"
+//usage: "\n""sSIZE - when to rotate logs"
+//usage: "\n""nNUM - number of files to retain"
+/*usage: "\n""NNUM - min number files to retain" - confusing */
+/*usage: "\n""tSEC - rotate file if it get SEC seconds old" - confusing */
+//usage: "\n""!PROG - process rotated log with PROG"
+/*usage: "\n""uIPADDR - send log over UDP" - unsupported */
+/*usage: "\n""UIPADDR - send log over UDP and DONT log" - unsupported */
+/*usage: "\n""pPFX - prefix each line with PFX" - unsupported */
+//usage: "\n""+,-PATTERN - (de)select line for logging"
+//usage: "\n""E,ePATTERN - (de)select line for stderr"
+