One more try and you probably would have had it :)

As demonstrated in the EXAMPLES section in syslog.conf(5), first use
!!myprog, then !*, then the standard ones.


On 2011-03-14, Paul M <l...@no-tek.com> wrote:
> I have a program who's output I want to log exclusively to it's own 
> file.
> Which is to say I dont want any of it's output appearing in the system 
> logs.
>
> Reading the syslog man pages this doesn't seem possible:
> If I put
> !!myprog
> *.*           /path/to/logfile
>
> after the initial block (which has no !prog tag), then when the initial 
> block is evaluated and matching entries (based on wildcards) will send 
> output from my program to the system logs.
>
> If I put my program tag before the initial block, then the initial 
> block becomes part of the block tagged by !!myprog, so will no longer 
> work as desired.
>
> If I put a !* tag after my program block to sepparate the initial block 
> from !!myprog, that undoes the exclusive nature of !!myprog.
>
> Perhaps I could do this by using one of the 'local' levels. This would 
> probably work, but would break if some other program used the same 
> local level as me.
>
> I see there is syslog-ng which may be more flexible, but I'd rather 
> stick with simply configuring the built in syslogd. If I cant get that 
> to work, I could write my own dedicated logger to only handle my 
> program's output (which would bring other benefits).
>
> Is there a way to do this with syslogd?
>
>
> paulm

Reply via email to