65 reputation
13
bio website linkedin.com/in/…
location New York, United States
age 27
visits member for 1 year
seen yesterday

Oct
15
comment Logging doesn't work after rsyslog upgrade
Yeah, it works if I add an additional space after the colon. Also, I have to cut this space from the %msg% in the template, like %msg:2:$\n.
Oct
14
awarded  Scholar
Oct
14
accepted Logging doesn't work after rsyslog upgrade
Oct
14
comment Logging doesn't work after rsyslog upgrade
Thank you very much for your help.
Oct
14
awarded  Benefactor
Oct
14
comment Logging doesn't work after rsyslog upgrade
Hm, this means that I have to have a space after the colon and this is actually the correct behavior, right? (it's feature - not a bug :))
Oct
14
comment Logging doesn't work after rsyslog upgrade
Yeah, thanks, this is exactly what the problem is. Well, in theory I can change tags in the applications, but ideally this should be somehow configured or fixed in the rsyslog config (like I've done it in my answer)..
Oct
14
comment Logging doesn't work after rsyslog upgrade
FYI, adding a space after the tag, like logger -t test: Hello World! makes it work..but, as I said, I cannot change the format of messages coming to rsyslog.
Oct
14
comment Logging doesn't work after rsyslog upgrade
Ok, let's test it on example. Here's rsyslog.conf that I'm using now for testing. When I run logger -t test:Hello World! - I see just World! in the log file. In other words, %msg% contains only World!, and %rsyslogtag% is equal to test:Hello..can you reproduce it?
Oct
14
comment Logging doesn't work after rsyslog upgrade
may be this is a bug in this particular rsyslog version (5.8.10)..could you try the same test but using 5.8.10? Thanks.
Oct
14
answered Logging doesn't work after rsyslog upgrade
Oct
14
comment Logging doesn't work after rsyslog upgrade
Thank you for pointing to use $programname, it makes the if condition work and I see log messages in the log file. But, the problem is that the actual log message is truncated by $syslogtag. Please see my comment to @Bgs answer.
Oct
14
comment Logging doesn't work after rsyslog upgrade
This makes the if condition work, but log messages are truncated, e.g. if the message sent to rsyslog is rel:Hello World!, then the actual log message written to log file contains only World!, since $syslogtag "eats" a part of the log message and is equal to dev:Hello in this case. Don't know why. Thank you anyway.
Oct
8
awarded  Student
Oct
7
awarded  Promoter
Oct
2
asked Logging doesn't work after rsyslog upgrade
Jun
18
awarded  Citizen Patrol
Apr
19
awarded  Vox Populi
Apr
19
awarded  Suffrage
Apr
16
awarded  Analytical