Configuring Logging in the PubSub+ JCSMP API
the PubSub+ JCSMP API uses Apache Commons Logging to support different logging frameworks, such as log4j
or java.util.logging
for the application’s logging framework.
To turn on logging of Kerberos events, set the Java system property to the following: -Dsun.security.krb5.debug=true
.
Level | Description |
---|---|
Fatal |
These log levels are reserved for internal errors and should be a cause for investigation. Contact Solace customer support for log events at this level. |
Error |
|
Warn |
Indicates an application error (for example, invalid parameters passed in or unsupported use of the APIs). |
Info |
Typically used for state changes at a high level (for example, connect/disconnect/reconnect). It is also used for unusual events that do not indicate any error, but they are unexpected and might need investigation. |
Debug |
This log level is voluminous and typically requires Solace customer support to interpret. |
Trace |
Not used. |
When a log level is set at a given level, all log events with log levels less severe than the selected level are filtered out, all log levels equally or more severe are included. For example, if the Error
log filter level is selected, only Error
and Fatal
events are included.
Java designers should be familiar with such logging frameworks because they are an established standard for Java-based systems. However, you should consider the following points:
- When using log4j, the directory in which the
log4j.properties
file andlog4j.jar
file exist is on the classpath. - When using log4j, including the
log4j.jar
library file withoutlog4j.properties
in the classpath negatively impacts performance.