This topic describes how to enable logging and tracing within Data Capture and Delivery.
Logging can be controlled in a number of places, each place influencing what is logged and where it is logged. In order to understand how to control the logging, it is important to understand how the messages flow through the system.
A logging agent compares the log event to the value of its log threshold property. If the log message is equal to or more severe than its threshold, then it forwards the log message as appropriate.
The debug export utility bundles do not have a threshold. They show all messages in the central logging system buffer. So, in effect, this is determined by the system log level, org.eclipse.soda.sat.core.util.logLevel.
In summary, the log level can be set at the controller level, the agent level, and the log consumer agent level. Log messages propagate only if they pass the agent's log level, the system log level, and the log consumer agent level.
Tracing is a more detailed set of log messages than debug. You can set system-level tracing on the Alert agent using the org.eclipse.soda.sat.core.util.trace property. Use the tracing property on each agent to set agent-level tracing.
To simplify the setting of these values across all controllers and agents, there are macros that have been defined in the WebSphere Sensor Events server and set as the default as indicated below:
You can also change the value of a property for a specific controller or agent.
In addition, the following Console Log agent properties can be used to configure the level of messages displayed to the OSGi console without modifying the system log level:
Property | Description |
---|---|
errorLogThreshold | Minimum level of messages that are written to stderr. Valid values are none, error, warning, info, or debug. |
logThreshold | Minimum level of messages that are written to stdout. Valid values are none, error, warning, info, or debug. If the value is empty then the system log level is used. |
If you want to log INFO level messages, and more severe ones, to a file, but you only want to send WARNING level messages to the server, do the following in the WebSphere Sensor Events Administrative Console:
If you want to log DEBUG messages for one agent, but only INFO messages for other agents, and send all of those to a file, but you only want to send WARNING level messages to the server, do the following in the WebSphere Sensor Events Administrative Console:
If you want to log only WARNING messages, and more severe ones, but you only want to send INFO level messages to the server, this scenario is not possible. If only WARNING messages are sent to the logging system, then the INFO messages are dropped.
In most cases, the Log File agent's log.threshold property should be set to %SYSTEM_LOG_LEVEL%. This setting ensures that all detail logged to the system is captured, whether it is DEBUG or INFO, and it means that you do not need to change the property value when the system log level is changed.
Install the com.ibm.rfid.console.log bundle into your runtime environment and start it to enable log messages from the agents to be seen on the OSGi console. When collecting a log to send with a problem report, be sure to retrieve the system properties by issuing the setprop command at the OSGI prompt. Also retrieve the list of installed bundles by issuing the ss command at the OSGI prompt.