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