Most application development environments provide APIs to support the creation and logging of messages. The OSGi framework, Eclipse framework and the 1.4 JDK (JSR47) all provide different systems for logging messages. Due to this variety of logging and tracing options, in the Lotus
® Expeditor runtime, OSGi bundles, Eclipse applications and standard Java
™ components use different methods to record log messages. Other groups such as the Apache open source group have also created façade APIs to help abstract their developers from one specific logging implementation. The Apache commons logging APIs, for example, support applications written to these facades in the Lotus
Expeditor runtime, and will be redirected to the JSR47 logger for formatting and persistence.
The selection of the appropriate logging APIs is an application specific task in the Lotus
Expeditor runtime. In some cases it is quite simple to determine the best candidate for logging APIs, such as an eclipse application, which will already be reliant on eclipse APIs, in this case the Eclipse logging APIs would be the most appropriate choice. In the case of a pure OSGi application with no other eclipse dependency, it may be most appropriate to use the OSGi LogService to continue to support independence from the Eclipse APIs and allow the pure OSGi application to execute on OSGi frameworks besides the Lotus
Expeditor runtime which is based on the Eclipse implementation of the OSGi runtime. Finally, if the application has code leveraging the JRE logging APIs there is no reason to attempt to modify the application to leverage either the Eclipse APIs or the OSGi logging APIs, rather it can log directly to the much more rich JRE logger and its messages will be federated into the runtime system log via the Lotus
Expeditor core logging framework. While a specific developer or project may have an affinity for one API or the other, it should be noted that the most feature rich and flexible of these APIs is the JRE java.util.logging
APIs. With that said, it is recommended that all new projects leverage these APIs, and existing projects consider leveraging the JRE logging APIs in the future if/when their logging architecture is redesigned.
Expeditor works hard to differentiate between the terms logging and tracing. In Lotus
Expeditor, logging is enabled at all times and provides all of the information needed for standard problem determination of the product, while tracing produces a much more detailed set of information for advanced diagnostics/problem determination. While logging is enabled at all times for all components, tracing is not, but can be enabled simply on a component level by the end user or administrator. For more information on enabling/disabling logging and tracing please refer to the Assembling and Deploying Lotus Expeditor Applications
and the Troubleshooting
Parent topic: Developing for serviceability