Question & Answer
Question
Custom logger for IBM BPM Advanced Process Server modules
Answer
On Demand Consulting
Author: Vinoth Philominraaj
Please see attached doc for details:
BPM Custom logger framework provides generic reusable services for developers to simplify logging and debugging that can be used from Mediation Component, BPEL or Java implementations. The framework also ensures log messages follow specific pattern that helps quicker search / analysis.
Module specific configuration are cached into memory using BPM Dynamic Cache mechanism and reused for subsequent calls. Cached module specific entries can be removed from BPM dyna cache and reloaded from property file when required to update a property value. This feature enables logger setting to be modified per module at runtime without having to restart the module or application server.
This implementation uses log4j as as example, but this logger framework can be applied over any existing logging. The BPM Custom logger adds additional capability to the underlying logger to standardize the messages that are written to log and dynamically update log level for specific component at runtime.
Below is a sample usage scenario:
- Often in production environment we will need to lower the log level to info or trace to view the in and out messages, this action will cause all the module to dump messages into log which can impact performance. Also, we will get messages from all the components and delays debugging.
- When using this custom logger on top of the existing log implementation, the log level can be set at info but control component level log detail.
- For debugging the logPaylod attribute in BPMCustomLoggerConfig.xml must be set to true for the component and the cache entry specific to that component need to invalidated. The logger will load updated property during next invocation and the log will be printed at info level for that component only.
- For end to end debugging the involved components can be set to log the payload.
- The log payload can be turned off when relevant info are collected.
- This is done without restarting the server or application
Was this topic helpful?
Document Information
Modified date:
17 March 2019
UID
ibm10776435