You can configure the level of logging for the XMPP/HTTP Gateway, enable or disable logging entirely, and change the location of the gateway log file or the gateway log configuration file as described in the following sections:
More information about the log4j format supported by Instant Messaging's is described at the Apache Logging Services website.
You can enable or disable logging for the gateway in two ways:
Adding or removing the value for the httpbind.log4j.config parameter in httbind.conf.
(Recommended) Modifying the configuration within the gateway's log4j configuration file (httpbind_log4j.conf).
Under most circumstances, you should modify the configuration in the httpbind_log4j.conf file itself, leaving the httpbind.log4j.config parameter set to the location of the httpbind_log4j.conf file. This procedure describes modifying the configuration within the httpbind_log4j.conf file.
Open the httpbind_log4j.conf file.
This file is stored at the location you specified in httpbind.conf file as the value for thehttpbind.log4j.config parameter. By default the file is stored in the following directory under the default Instant Messaging instance:
im_cfg_base/httpbind_log4j.conf |
To disable logging for the gateway, set the log4j.logger.gateway parameter as follows:
log4j.logger.gateway=OFF |
To enable logging, set the log4j.logger.gateway parameter to the desired logging level.
For example:
log4j.logger.gateway=ERROR |
See Table 11–1 for a list of valid logging levels you can use.
Save and close httpbind_log4j.conf.
Open httpbind.conf.
See httpbind.conf File Location for information on finding this file.
Set the value of the httpbind.log4j.config parameter to the location of the XMPP/HTTP Gateway log configuration file.
Save and close httpbind.conf.
Restart the gateway using the tools provided by the web or application server.
Ensure that you are familiar with the log4j syntax and general implementation described at the Apache Logging Services website.
Open httpbind_log4j.conf.
This file is stored at the location you specified in httpbind.conf file as the value for thehttpbind.log4j.config parameter. By default the file is stored in the following directory under the default Instant Messaging instance:
im_cfg_base/httpbind_log4j.conf |
Set the value for the log4j.appender.appender_ID parameter to the location where you want to store the log file.
Save and close httpbind_log4j.conf.
Restart the web container.
Ensure that you are familiar with the log4j syntax and general implementation described at the Apache Logging Services website.
Open httpbind_log4j.conf.
This file is stored at the location you specified in httpbind.conf file as the value for thehttpbind.log4j.config parameter. By default the file is stored in the following directory under the default Instant Messaging instance:
im_cfg_base/httpbind_log4j.conf |
Set the log4j.logger.gateway parameter to the desired logging level.
For example:
log4j.logger.gateway=ERROR |
See Table 11–1 for a list of valid logging levels you can use.
For more information about the log4j syntax and general implementation, see the Apache Logging Services website. The gateway log configuration file syntax is as follows.
log4j.logger.gateway=logging_level, Appender_ID # DEFAULT TO RollingFileAppender log4j.appender.Appender_ID=org.apache.log4j.RollingFileAppender log4j.appender.Appender_ID.file=log_dir/httpbind.log log4j.appender.Appender_ID.append=true|false log4j.appender.Appender_ID.maxBackupIndex=7 log4j.appender.Appender_ID.maxFileSize=max_log_file_size log4j.appender.Appender_ID.layout=org.apache.log4j.PatternLayout log4j.appender.Appender_ID.layout.ConversionPattern=log_entry_syntax |
log4j.logger.gateway=ERROR, A1 # DEFAULT TO RollingFileAppender log4j.appender.A1=org.apache.log4j.RollingFileAppender # log4j.appender.A1.file=$(logdir)/gateway.log log4j.appender.A1.file=/tmp/gatewaylog log4j.appender.A1.append=true log4j.appender.A1.maxBackupIndex=7 log4j.appender.A1.maxFileSize=5mb log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=[%d{DATE}] %-5p %c [%t] %m%n |