Search code examples
log4jsyslog

log4j SyslogAppender does not send logs to syslog


A web application running in Websphere is using log4j SysLogAppender to log messages to a syslog daemon located in the same machine. The default setting of the syslog daemon says LOG_FROM_REMOTE=NO. Does this mean that the web application which is located in the same machine as the syslog daemon cannot accept the messages?


Solution

  • If LOG_FROM_REMOTE is set to YES it listens the specified UDP port. If it is set to NO it does not. Since you set the value to no, it does not listen to the port and cannot receive log messages.

    Even if logappender and the daemon are on the same computer, they need to communicate via a UDP port.