The log4j system used in BEA AquaLogic Service Registry can be configured to send log messages to the syslog daemon. In order to utilize this feature, your system must be configured as follows:
REGISTRY_HOME/conf/log4j.config
. First add a syslog appender, as shown in Listing 16-1. Note the following properties in particular:# 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:
# event monitoring
log4j.category.com.systinet.wasp.events=INFO,eventLog,syslog
syslogd
configuration to recognize log messages from BEA AquaLogic Service Registry. Implicitly, BEA AquaLogic Service Registry 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/registry.log
BEA AquaLogic Service Registry will now log messages of all priorities into the file /var/log/registry.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).
Note: | The local6 facility is not mandatory in any way. You may use other localX facilities instead. |
BEA AquaLogic Service Registry can be forced to start as a system daemon using the script REGISTRY_HOME/etc/bin/registry.sh
. This script can be renamed registry as per UNIX conventions. The directions for using this script follow.
registry
(without the .sh extension) and save it in the /etc/init.d/
directory.SXXregistry
and KXXregistry
symbolic links in the appropriate /etc/rcX.d/
directory.
Now you may start and stop BEA AquaLogic Service Registry using the installed script. You can invoke this script directly or by using specific OS tools. For example, on RedHat, by using the redhat-config-services
command.
The parameters of the script are shown in the following table.
Note: | The provided startup script may be run by the root user. The script uses the su command to run as REGISTRY_USER. |