I have a question on how to configure correctly to get rails logger.error
message showing up in SysLog
. We used SyslogLogger gem
. In our Syslog config
, we have filter like this:
if $programname == 'rails' and ($syslogseverity-text == 'emerg') then @somehost
if $programname == 'rails' and ($syslogseverity-text == 'alert') then @somehost
if $programname == 'rails' and ($syslogseverity-text == 'crit') then @somehost
if $programname == 'rails' and ($syslogseverity-text == 'err') then @somehost
if $programname == 'rails' and ($syslogseverity-text == 'warn') then @somehost
if $programname == 'rails' then ~
When there is exception or fatal error, the log of stack trace will be showing up. However, any statements that we use logger.error
to log them are not showing up.