Operating Systems: i5/OS
Personalize the table of contents and search results
Configure the logger hierarchy
WebSphere Application Server handlers are attached to the Java
root logger, which is at the top of the logger hierarchy. As a result, any
request from anywhere in the logger tree can be processed by WebSphere Application
Server handlers.
Overview
You can configure your application server to handle logs in many
different ways. Configure your log settings based upon your configuration
and the logging structure that best suits your needs.
Procedure
- Forward all application logging requests to the WebSphere Application
Server handlers. This behavior is the default.
- Forward all application logging requests to your own custom handlers.
Set the useParentHandlers option to false on
one of your custom loggers, and then attach your handlers to that logger.
- Forward all application logging requests to both WebSphere Application
Server handlers, and your custom handlers, but do not forward WebSphere Application
Server logging requests to your custom handlers. Set the useParentHandlers option
to true on one of your non-root custom loggers, and then
attach your handlers to that logger.True is the default setting.
- Forward all WebSphere Application Server logging requests to both
WebSphere Application Server handlers, and your custom handlers. Logging
requests are always forwarded to WebSphere Application Server handlers. To
forward WebSphere Application Server requests to your custom handlers, attach
your custom handlers to the Java root logger, so that they are at the same
level in the hierarchy as the WebSphere Application Server handlers.
Example
The following example shows how these requirements can be met
using the Java logging infrastructure:
}
Using a logger
Creating log resource bundles and message files
Related Reference
Example: Creating custom log handlers with java.util.logging
Example: Creating custom filters with java.util.logging
Example: Creating custom formatters with java.util.logging
Example: Adding custom handlers, filters, and formatters
|