The log4j system used in WSO2 SOA Enablement Server can be configured to send log messages to the syslog daemon. In order to utilize this feature, your system must be configured in the following way:
Change the log4j in WASP_HOME/conf/log4j.config. First add a syslog appender, as shown in Example 4. Note the following properties in particular:
syslogHost: Set to host name of computer where syslog is running.
Facility: WSO2 SOA Enablement Server log message facility recognized by syslog.
Example 4. log4j.config--syslog appender
# Appender to syslog log4j.appender.syslog=org.apache.log4j.net.syslogAppender log4j.appender.syslog.syslogHost=localhost log4j.appender.syslog.Facility=local6 log4j.appender.syslog.layout=org.apache.log4j.PatternLayout log4j.appender.syslog.layout.ConversionPattern=%p: %c{2} - %m%n
Then add "syslog" to the value of the property log4j.category.com.systinet.wasp.events under "# event monitoring," as follows:
Set the syslogd configuration to recognize log messages from WSO2 SOA Enablement Server. Implicitly, WSO2 SOA Enablement Server sends log messages to syslog under the facility local6. Therefore, modify the /etc/syslog.conf file by adding the following line of text:
local6.* /var/log/wasp.log
WSO2 SOA Enablement Server will now log messages of all priorities into the file /var/log/wasp.log. You should create this file now with appropriate permissions (otherwise syslogd will create it for you automatically with default permissions, which may not be suitable for you).
Your syslog daemon must be started with remote logging enabled (the -r command line option). To make sure that:
syslogd is running, use the pgrep syslogd command.
remote logging is enabled, use the netstat -l command (syslog's udp port is 514).
![]() | Note |
---|---|
The local6 facility is not mandatory in any way. You may use other localX facilities instead. |