Network Deployment (Distributed operating systems), v8.0 > Reference > Developer detailed usage information


java.util.logging


The java.util.logging.Logger class provides a variety of methods with which data can be logged.

In the WAS, the Java logging API (java.util.logging) automatically creates Common Base Events for events that are logged at the WsLevel.DETAIL level or above...

These Common Base Events are created using the event factory that is associated with the logger to which the message is logged. If no event factory is specified, WAS uses a default event factory which automatically fills in WAS-specific information.

The WAS uses a special implementation of the java.util.logging.Logger class that automatically creates Common Base Events for the following methods:

The WAS logger implementation is used only for named loggers for example, loggers that are instantiated with calls, such as...

Loggers instantiated with calls to methods...

...do not use the WAS implementation, and do not automatically create Common Base Events for logging requests made to them. Log records that are logged directly with the Logger.log(LogRecord) method are not automatically converted by WAS loggers into Common Base Events.


The Java logging API processing of named loggers and message-level events proceeds as follows:

  1. Application code invokes the named logger (WsLevel.DETAIL or above) with event-specific data.
  2. The logger creates a Common Base Event using the createCommonBaseEvent method on the event factory that is associated with the logger.
  3. The logger creates a Common Base Event using the event factory associated to the logger.
  4. The logger wraps the common base event in a CommonBaseEventLogRecord record, and adds event-specific data.
  5. The logger calls the Common Base Event complete method.
  6. The Common Base Event invokes the ContentHandler completeEvent method.
  7. The content handler adds XML template data to the Common Base Event (including for example, the component name). Not all content handlers support templates.
  8. The content handler adds runtime data to the Common Base Event (including for example, the current thread name).
  9. The logger passes the CommonBaseEventLogRecord record to the handlers.
  10. The handlers format data and write to the output device.


Log with Common Base Event API and the Java logging API


Related


Logger.properties file

+

Search Tips   |   Advanced Search