I have a problem with logger command. After upgrading syslog-ng to 3.3th version (maybe it is not directly depend on it), logger (using command below) doesn’t log tag names:
logger -t "BLABLA" some_log_string
How can I solve it? I searched around but couldn’t find anything regarding this issue.
Thanks in advance.
Ok, I solved this problem myself. Apperantly, the creators of syslog-ng have changed it a bit in the new version (3.0), which I use syslog-ng 3.3. In order to display the log messages with application name, we have to include $MSGHDR
directive with $MSG
. Example template will be like:
template("$DATE $YEAR $MSGHDR$MSG\n")
From now on, the syslog-ng will log like this:
Dec 15 15:22:01 2012 fw_update_app: fw dir found
Check more discussion of this question.