On Wed, 2006-07-12 at 15:27 -0700, John Caruso wrote:
At Friday 11:14 AM 9/17/2004, Balazs Scheidler wrote:
On Thu, 2004-09-16 at 19:36, Lars Kellogg-Stedman wrote:
Text logged to a program via the program() destination has a prefix of the form <nnn>, which I'm assuming is the encoding of the syslog level and facility. Great! But I don't want it :).
Is there any way to prevent this text from being logged? Sure, I can write a "wrapper" program to edit these messages before they reach the intended destination, but my template doesn't ask for this information, so I'm not sure it should be there.
I think this was fixed in one of the recent versions.
I just ran into this bug while using syslog-ng 1.6.0rc1 with a program destination on a Solaris system. After finding the above discussion from 2004 I upgraded to 1.6.11...but the bug is still there. Here are some samples of lines handed off from syslog-ng to the external program:
<6>Jul 7 14:53:50 sys1 kernel: SysRq : Emergency Sync <4>Jul 7 14:53:50 sys1 kernel: Emergency Sync complete <6>Jul 7 14:53:51 sys2 kernel: SELinux: initialized (dev 0:15, type nfs), uses genfs_contexts
I'm getting around this by editing out the prefix, but it would be good if this were fixed in syslog-ng itself.
Let me stress that _this is not a bug_, it is working as intended. Newer versions can specify a template for programs, which can be used to omit the priority value. -- Bazsi