Subject: Getting to grips with syslog and localn.*
To: None <netbsd-help@netbsd.org>
From: Amadeus Stevenson <amadeus.stevenson@gmail.com>
List: netbsd-help
Date: 04/29/2006 10:17:51
Hello,
I've got a few access point logs attached to my netbsd syslogd, and
after searching the internet and reading the man pages am no closer to
understanding how to separate their messages from /var/log/messages
into something else:
amadeus@GATEWAY$ uname -a
NetBSD GATEWAY 2.0 NetBSD 2.0 (RALTQ) #0: Sat Jun 4 01:20:28 BST 2005
amadeus@GATEWAY:/usr/src/sys/arch/i386/compile/RALTQ i386
amadeus@GATEWAY$ cat /etc/syslog.conf
# $NetBSD: syslog.conf,v 1.8 2003/04/02 14:38:26 perry Exp $
*.err;kern.*;auth.notice;authpriv.none;mail.crit /dev/console
*.info;auth,authpriv,cron,ftp,kern,lpr,local7.none,mail.none =20
/var/log/messages
kern.debug /var/log/messages
# The authpriv log file should be restricted access; these
# messages shouldn't go to terminals or publically-readable
# files.
auth,authpriv.info /var/log/authlog
cron.info /var/log/cron
ftp.info /var/log/xferlog
lpr.info /var/log/lpd-errs
mail.info /var/log/maillog
#uucp.info /var/spool/uucp/ERR=
ORS
*.emerg *
*.notice root
local7.* /var/log/dhcpd.log
I managed some time ago to separate out dhcpd logs (although how I
knew it was local7 is a mystery).
I'd like to do the same for dhclient logs as well, but don't know how
to divert the dhclient log messages into a file eg.
/var/log/dhclient.log. The same goes for named logs (bind9).
Also, all my access points are filling up /var/log/messages nicely,
but I'd far prefer to have them log to a separate file. Their entry is
similar to:
Apr 29 10:13:23 xxx.xxx.xxx.xx2 Associated: 00-11-50-BB-C8-E2 st=3D0^M
Apr 29 10:13:47 xxx.xxx.xxx.xx2 Disassociated: 00-11-50-BB-C8-E2^M
How do I "find out" what facility corresponds to my access point
messages, named and dhclient? (Also stripping the ^M character would
be handy too).
Thanks for any tips,
Amadeus