[syslog-ng] About Syslog-ng Macro

Fegan, Joe Joe.Fegan at hp.com
Fri Apr 4 10:37:24 CEST 2008


Hello Watanabe-san,

Do you think this is this a difference between the "program" driver the "file" driver?
Or a problem with the $MSG macro in general?

If you use template t_temp to write to a file, do Japanese characters appear correctly in that file?

Joe.

-----Original Message-----
From: syslog-ng-bounces at lists.balabit.hu [mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Yu Watanabe
Sent: 04 April 2008 09:24
To: syslog-ng at lists.balabit.hu
Subject: [syslog-ng] About Syslog-ng Macro

TO : Syslog-NG Developers

Hello ,

I have a question regarding to the syslog-ng macros that is useful in the syslog.conf.

I am using syslog-ng in the follwoing development.

1. Linux **** 2.6.9-42.EL #1 Sat Aug 12 09:17:58 CDT 2006 i686 i686 i386 GNU/Linux
2. CentOS release 4.4 (Final)
3. LANG=ja_JP.eucJP

However, whenever I try to ouput the multibye code(EUC) through the macro such as $MSG
the message do not show properly.

I am defining the following template and destination function in the config file.

template t_temp { template("$S_YEAR-$S_MONTH-$S_DAY $S_HOUR:$S_MIN:$S_SEC $SOURCEIP $MSG\n"); };
destination d_log { program("/tmp/stdin2phpsyslogng.pl > /tmp/stdin2phpsyslogng.log 2>&1" template(t_temp)); };

But in the log file which is created through the file driver the japanese code shows properly.

I am defining the following definition

destination host_splitter { file( "/tmp/$HOST.log" owner(root) group(root) perm(0644) dir_perm(0755) create_dirs(yes)); };

I am looking in the source code but I am having trouble with the investigation.

If its possible, I would like to know why this is happening.

Is there any way to modify the macro problem?

Thank you!

Yu Watanabe

______________________________________________________________________________
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



More information about the syslog-ng mailing list