Question

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?

Was it helpful?

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.

OTHER TIPS

Thank you jcasso for your help. It helped to resolve the problem. Just to help others who might ran into the same problem, please check whether the LOG_FROM_REMOTE property is set to YES in /etc/default/syslog.conf. Otherwise log4j logs will not reach syslog. syslog dameon listens for UDP packets on port 514 (default port). So running log4j with debug turned on will not help log4j will not whether the packets reached syslog or not. Hope it helps

If you use syslog-ng then need to uncomment (in /etc/syslog-ng file) " udp(); " line in " source s_all { " section.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top