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:
To Change the Location of the XMPP/HTTP Gateway Log Configuration File
Linux: To Set the Location of the XMPP/HTTP Gateway Log File After Install or Upgrade
To Use a Non-default Log File Location for the XMPP/HTTP Gateway
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 the httpbind.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 13–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.
On Linux, after you install and configure the XMPP/HTTP Gateway, you need to modify the location of the default log file for the XMPP/HTTP gateway in httpbind_log4j.conf.
Open the httpbind_log4j.conf file.
This file is stored at the location you specified in httpbind.conf file as the value for the httpbind.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 of the log4.appender.appender_ID.file parameter to the location where log files are stored.
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 the httpbind.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.
If you choose to use a location for logs other than the default, you need to modify the location of the default log file for the XMPP/HTTP gateway in httpbind_log4j.conf.
Open the httpbind_log4j.conf file.
This file is stored at the location you specified in httpbind.conf file as the value for the httpbind.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 of the log4.appender.appender_ID.file parameter to the location where log files are stored.
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 the httpbind.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 13–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 |