Document new include /etc/syslog.d/*.conf support
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
parent
dc2e7c013c
commit
b0a3d5cdd9
@ -43,6 +43,7 @@ local or remote logging.
|
|||||||
|
|
||||||
Main differences from the original sysklogd package are:
|
Main differences from the original sysklogd package are:
|
||||||
|
|
||||||
|
- Support for `include /etc/syslog.d/*.conf`, see example .conf
|
||||||
- Built-in log-rotation support, with compression by default, useful for
|
- Built-in log-rotation support, with compression by default, useful for
|
||||||
embedded systems. No need for cron and a separate logrotate daemon
|
embedded systems. No need for cron and a separate logrotate daemon
|
||||||
- Full [RFC3164][] and [RFC5424][] support
|
- Full [RFC3164][] and [RFC5424][] support
|
||||||
|
@ -34,13 +34,17 @@ rules for logging. For special features see the
|
|||||||
.Xr syslogd 8
|
.Xr syslogd 8
|
||||||
man page.
|
man page.
|
||||||
.Pp
|
.Pp
|
||||||
Every rule consists of two fields, a
|
Every rule has at least two fields, a
|
||||||
.Em selector
|
.Em selector
|
||||||
field an
|
field and an
|
||||||
.Em action
|
.Em action .
|
||||||
and an optional
|
They may also have an optional flag or setting that applies only to
|
||||||
|
that rule. E.g,
|
||||||
.Em logrotate
|
.Em logrotate
|
||||||
field. The fields are separated by one or more spaces or tabs. The
|
settings or output format flag. A rule may be divided into several
|
||||||
|
lines if the leading line ends with a single backslash ('\\') character.
|
||||||
|
.Pp
|
||||||
|
The fields are separated by one or more spaces or tabs. The
|
||||||
selector field specifies a pattern of facilities and priorities
|
selector field specifies a pattern of facilities and priorities
|
||||||
belonging to the specified action. The action details where or what to
|
belonging to the specified action. The action details where or what to
|
||||||
do with the selected input. The optional logrotate field is only for
|
do with the selected input. The optional logrotate field is only for
|
||||||
@ -49,16 +53,17 @@ rotated, and later compressed. The log rotated feature is mostly
|
|||||||
intended for embedded systems that do not want to have cron and a
|
intended for embedded systems that do not want to have cron and a
|
||||||
separate log rotate daemon.
|
separate log rotate daemon.
|
||||||
.Pp
|
.Pp
|
||||||
Lines starting with a hash mark ('#') and empty lines are ignored. If
|
Comments, lines starting with a hash mark ('#'), and empty lines are
|
||||||
an error occurs during parsing the whole line is ignored.
|
ignored. If an error occurs during parsing the whole line is ignored.
|
||||||
.Pp
|
The configuration file can also include other files. The example
|
||||||
This variant of
|
.Pa /etc/syslog.conf
|
||||||
.Nm syslogd
|
has the following at the end:
|
||||||
is able to understand a slightly extended syntax compared to the
|
.Bd -literal -offset indent
|
||||||
original BSD
|
#
|
||||||
.Nm syslogd .
|
# Drop your subsystem .conf file in /etc/syslog.d/
|
||||||
One rule may be divided into several lines if the leading line ends
|
#
|
||||||
with a single backslash ('\\') character.
|
include /etc/syslog.d/*.conf
|
||||||
|
.Ed
|
||||||
.Sh SELECTORS
|
.Sh SELECTORS
|
||||||
The selector field consists of two parts, a
|
The selector field consists of two parts, a
|
||||||
.Em facility
|
.Em facility
|
||||||
@ -446,23 +451,13 @@ machine.
|
|||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
*.* @finlandia;RFC5424
|
*.* @finlandia;RFC5424
|
||||||
.Ed
|
.Ed
|
||||||
.Sh SYNTAX DIFFERENCES
|
|
||||||
.Nm syslogd
|
|
||||||
allows for a slightly extended syntax for
|
|
||||||
.Nm
|
|
||||||
compared to the original BSD
|
|
||||||
.Nm syslogd .
|
|
||||||
The modifiers '=', '!', and '-' were added to make the syntax more
|
|
||||||
flexible and to use it in a more intuitive manner. Also, the original
|
|
||||||
BSD
|
|
||||||
.Nm syslogd
|
|
||||||
doesn't understand spaces as separators between the selector and the
|
|
||||||
action field.
|
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
.Bl -tag -compact -width /etc/syslog.conf
|
.Bl -tag -compact -width /etc/syslog.d/*.conf
|
||||||
.It /etc/syslog.conf
|
.It /etc/syslog.conf
|
||||||
Configuration file for
|
Main configuration file for
|
||||||
.Xr syslogd 8
|
.Xr syslogd 8
|
||||||
|
.It /etc/syslog.d/*.conf
|
||||||
|
Recommended directory for .conf snippets (per subsystem)
|
||||||
.El
|
.El
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
The effects of multiple selectors are sometimes not intuitive. For
|
The effects of multiple selectors are sometimes not intuitive. For
|
||||||
|
@ -44,3 +44,8 @@ mail,news.=info -/var/adm/info
|
|||||||
# to the operator
|
# to the operator
|
||||||
#
|
#
|
||||||
*.alert root,joey
|
*.alert root,joey
|
||||||
|
|
||||||
|
#
|
||||||
|
# Drop your subsystem .conf file in /etc/syslog.d/
|
||||||
|
#
|
||||||
|
include /etc/syslog.d/*.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user