summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syslogd/syslog.conf.5
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2000-07-24 14:10:17 +0000
committerdwmalone <dwmalone@FreeBSD.org>2000-07-24 14:10:17 +0000
commitc0626c77861736081f7054b6e9761b7b29f9a385 (patch)
tree1a3448175cf0bda7ab8abb0619a18a46b988ed1c /usr.sbin/syslogd/syslog.conf.5
parent3ab32b361313c8de8687514cca40285aa5e9f8bc (diff)
downloadFreeBSD-src-c0626c77861736081f7054b6e9761b7b29f9a385.zip
FreeBSD-src-c0626c77861736081f7054b6e9761b7b29f9a385.tar.gz
Allow syslogd to select messages based on the originating host in
a similar way to the way it can select messages from a given program. Lines beginning with "+hostname" or "#+hostname" select messaes from that hostname and lines beginning with "-hostname" or "#-hostname" match messages not from that hostname. There are some significant style issues left in the original program selection code and the man page. This should be cleared up in some later commits. Reviewed by: sheldonh Based on an original patch by: Bernd Walter <ticso@cicely8.cicely.de> Man page stylist: sheldonh
Diffstat (limited to 'usr.sbin/syslogd/syslog.conf.5')
-rw-r--r--usr.sbin/syslogd/syslog.conf.572
1 files changed, 63 insertions, 9 deletions
diff --git a/usr.sbin/syslogd/syslog.conf.5 b/usr.sbin/syslogd/syslog.conf.5
index 4e493d2..2f2c9a3 100644
--- a/usr.sbin/syslogd/syslog.conf.5
+++ b/usr.sbin/syslogd/syslog.conf.5
@@ -49,6 +49,8 @@ program.
It consists of
blocks of lines separated by
.Em program
+and
+.Em hostname
specifications,
with each line containing two fields: the
.Em selector
@@ -136,19 +138,71 @@ values specified to the
.Xr syslog 3
library routine.
.Pp
-Each block of lines is separated from the previous block by a tag.
-The tag
-is a line beginning with
-.Em #!prog
+Each block of lines is separated from the previous block by a
+.Em program
+or
+.Em hostname
+specification.
+A block will only log messages corresponding to the most recent
+.Em program
+and
+.Em hostname
+specifications given.
+Thus, a block which selects
+.Ql ppp
+as the
+.Em program ,
+directly followed by a block that selects messages from the
+.Em hostname
+.Ql dialhost ,
+then the second block will only log messages
+from the
+.Xr ppp 8
+program on dialhost.
+.Pp
+A
+.Em program
+specification is a line beginning with
+.Ql #!prog
or
-.Em !prog
+.Ql !prog
(the former is for compatibility with the previous syslogd, if one is sharing
.Pa syslog.conf
files, for example)
-and each block will be associated with calls to syslog from that specific
-program.
-A tag for ``foo'' will also match any message logged by the kernel
-with the prefix ``foo: ''.
+and the following blocks will be associated with calls to
+.Xr syslog 3
+from that specific program.
+A
+.Em program
+specification for
+.Ql foo
+will also match any message logged by the kernel with the prefix
+.Ql "foo: " .
+A
+.Em hostname
+specification of the form
+.Ql #+hostname
+or
+.Ql +hostname
+and the following blocks will be applied to messages
+received from the specified hostname.
+Alternatively, a
+.Em hostname
+specification
+.Ql #-hostname
+or
+.Ql -hostname
+causes the following blocks to be applied to messages
+from any host but the one specified.
+If the hostname is given as
+.Ql @ ,
+the local hostname will be used.
+A
+.Em program
+or
+.Em hostname
+specification may be reset by giving the program or hostname as
+.Ql * .
.Pp
See
.Xr syslog 3
OpenPOWER on IntegriCloud