Re: [syslog-ng] TAG-Macro
-----Original Message----- From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu]On Behalf Of Balazs Scheidler Sent: Tuesday, March 18, 2008 12:46 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] TAG-Macro
Something like BSDTAG?
Attached is a patch to the 2.0.9 source tree of syslog-ng which implements the "BSDTAG" macro. bye Chris
Thanks for your contribution. Could you please submit a signed "Contributory License Agreement" via FAX to us, as described here: http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/... Thanks in advance, and sorry for the legal hassles. On Thu, 2008-03-27 at 13:49 +0100, JUNG, Christian wrote:
-----Original Message----- From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu]On Behalf Of Balazs Scheidler Sent: Tuesday, March 18, 2008 12:46 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] TAG-Macro
Something like BSDTAG?
Attached is a patch to the 2.0.9 source tree of syslog-ng which implements the "BSDTAG" macro.
bye Chris ______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
-- Bazsi
I've started reviewing your BSDTAG patches and I have some comments: On Thu, 2008-03-27 at 13:49 +0100, JUNG, Christian wrote:
+ case M_BSDTAG: + { + const char *n; + + g_string_sprintfa(result, "%d", (msg->pri & LOG_PRIMASK)); + + n = syslog_name_lookup_name_by_value(msg->pri & LOG_FACMASK, sl_bsdtag_facilities);
Are you sure you need the sl_bsdtag_facilities lookup? From what I can see the facility information in the BSD tag field is a direct mapping from the numerical value to its alphabetical representation. I mean, I think you can have the same result by using this expression: isn't this the same: g_string_sprintfa(result, "%d%c", (msg->pri & LOG_PRIMASK), (msg->pri >> 3) + 'A'); Or am I missing something? If this solution is used, you can skip the lookup. -- Bazsi
participants (2)
-
Balazs Scheidler
-
JUNG, Christian