[syslog-ng] Facility / Priority

Jeremy M. Guthrie jeremy.guthrie at berbee.com
Tue May 23 16:29:00 CEST 2006


On Tuesday 23 May 2006 05:06, Balazs Scheidler wrote:
> On Mon, 2006-05-22 at 20:11 -0500, Jeremy M. Guthrie wrote:
> >         The issue I have found with Syslog-NG is that it does convert
> > the facility &
> > priority/severity to full names when writing.  Today I have Modular
> > Syslog
> > writing facility and severity as individual decimal values rather than
> > the
> > aggregate 0-255 decimal(see the table layout below).  I was wondering
> > if
> > someone knew of a way to get Syslog-NG to write out the
> > facility/priority
> > values separately?  .ie via the syslog-ng.conf filtering/manipulation
> > kung
> > fu?  Or does this look like a modification that I will have to make in
> > the .c
> > code?
>
> It depends on the template that you use, $FACILITY and $LEVEL writes it
> using names if possible, $TAG is a hexadecimal value for the
> facility/priority combined, and $PRI is the same in decimal.
>
> There's currently no macro for generating facility/priority separately
> in numeric form, it is not difficult to add though.
Yeah, this is where I am leaning.  I've got a pile of code I'd have to change 
otherwise.

> An alternative 
> solution would be to convert your tables to the 'enum' data type of
> mysql, which stores an integer internally, but accepts/shows the string
> representation.

-- 

--------------------------------------------------
Jeremy M. Guthrie        jeremy.guthrie at berbee.com
Senior Network Engineer        Phone: 608-298-1061
Berbee                           Fax: 608-288-3007
5520 Research Park Drive         NOC: 608-298-1102
Madison, WI 53711
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.balabit.hu/pipermail/syslog-ng/attachments/20060523/efd153d3/attachment.pgp


More information about the syslog-ng mailing list