Subject: Re: question about NetBSD syslog
To: None <>
From: Michael van Elst <>
List: netbsd-users
Date: 05/24/2007 06:13:18 (Aleksey Cheusov) writes:

>I think the following scheme

>func do_syslog (line)
>   if (match1(line)){
>      action1(line)
>   }elif if (match2(line)){
>      action2(line)
>   }elif ...
>   ...

>scheme is a reasonable alternative.

This just drops a valuable feature: logging events to
multiple destinations independently.

The thing that you cannot do with syslog now is to
log only low priority events but skip high priority
events. I.e.:	only-info.log

will result in only-info.log to get all events with
priority info or higher.

With your scheme you could do

user.notice	/dev/null	only-info.log

and divert the higher priority events to /dev/null
(or some other log file).

A better way of doing things is to distinguish these
events not by priority but by facility. But sometimes
you have no control over this.

Of course you could also use sysutils/syslog-ng which
has a rich set of filters.

                                Michael van Elst
                                "A potential Snark may lurk in every tree."