[syslog-ng] About Syslog-ng Macro

Yu Watanabe yu.watanabe at jp.fujitsu.com
Fri Apr 4 10:24:08 CEST 2008


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



More information about the syslog-ng mailing list