Hi,
Thank you, Sandor.
I have read the syslog-ng documentation, and only found a FACILITY and PRIORITY sample in it, such as: destination hosts { file("/var/log/syslogs/$HOST/$FACILITY" owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes));};
but my purpose is not to log these message into a file named as FACILITY, but to include this FACILITY in my log files, for example: Jun 25 20:53:34 c890f12ec07 local6:warn|warning c890f12ec07 root: sunjing test 1
"local6:warn" is what I wanted in the log file....could you help?
Sorry, I forgot that the doc doesn't provide too much details about macro usage. You can use these macros in templates too, for example: destination d_something { file( "/var/log/something" template("$ISODATE $FACILITY:$PRIORITY $MSG\n"; ); }; Regards, Sandor -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.