tags:

views:

623

answers:

3

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?

+1  A: 

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 logappender and the daemon is on the same computer, they need to communicate via a UDP port.

JCasso
Thank you for the quick turn around. It really helped.
kan
A: 

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

kan
A: 

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

Rukmal Dias