Network Deployment (Distributed operating systems), v8.0 > Troubleshoot and support > Work with Diagnostic Providers


Associate a Diagnostic Provider ID with a logger


Overview

Associating the Diagnostic Provider ID with a logger can be done dynamically or through a static assignment.

Components whose diagnostics are managed through a Diagnostic Provider MBean should include the Diagnostic Provider ID (DPID) in all logged messages. In some cases a single logger always logs with the same DPID. In those cases, it is appropriate to statically associate the DPID with the logger. In other cases, a logger might log on behalf of various diagnostic domains. For example, although every data source has a separate Diagnostic Provider MBean, they all share the same logger. In those cases, the DPID can be dynamically supplied on each logging call.


Static Assignment

To statically assign a DPID to a logger.


Dynamic Assignment

DPIDs can be associated with a single log request by including them as the first message parameter, prefixed with...

To associate a DPID with a single log request using a logger:

Note that in the dynamic case, the DPID does not need to actually show up in the formatted message. The two examples below illustrate:

IBM recommends that messages not include the DPID in the formatted message. As shown above, this is done by not including {0} in the message value in the resource bundle.

+

Search Tips   |   Advanced Search