[syslog-ng] Facility / Priority

Balazs Scheidler bazsi at balabit.hu
Tue May 23 12:06:38 CEST 2006


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. 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.


-- 
Bazsi



More information about the syslog-ng mailing list