Quantcast
Channel: Admins Goodies » syslog-ng
Viewing all articles
Browse latest Browse all 10

Linux logger doesn’t write tags to log files?

$
0
0

Question

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.

Asked by mtndesign

Answer

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

Answered by mtndesign

Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images