TO : Mr.Fegan Hello Joe, I experimented the template function in the file driver as you suggested. And again the message did not show properly. I have modified the file driver as below: destination host_splitter { file( "/tmp/$HOST.log" template(t_temp) owner(root) group(root) perm(0644) dir_perm(0755) create_dirs(yes)); }; So my thought is that the template function is doing something wrong in it's procedure. Best Regards, Yu Watanabe Fegan, Joe さんは書きました:
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@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Yu Watanabe Sent: 04 April 2008 09:24 To: syslog-ng@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
______________________________________________________________________________ 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
************************************************************ FUJITSU SOCIAL SCIENCE LABORATORY LIMITED(FUJITSU SSL) System Infrastructure Development Department Telecom Systems Business Group 2 Yu Watanabe E-Mail : yu.watanabe@jp.fujitsu.com Phone : 044-739-1427 +5283 / 7166-5283 ************************************************************