Pluggable request response logger
The following is a description of the changes to how InfoSphere® MDM uses and handles the request response logger.
Before OSGi
InfoSphere MDM provides
a default logging tool to log requests and responses. The logging
tool is configurable through the DWLCommon.properties file
entry Logging.ReqRespLogger=com.dwl.base.logging.DefaultReqRespLogger.
The default logging tool that comes with InfoSphere MDM stores a simple output of request and response messages in a log file. You can customize the default request and response logging by developing a user-defined request and response logging tool that implements the ReqRespLogger interface.
appender.reqrespLog=org.apache.logging.log4j.core.appender.RollingFileAppender
appender.reqrespLog.type = RollingFile
appender.reqrespLog.name = reqrespLogLogger
appender.reqrespLog.filename = /RequestResponseMessage.log
appender.reqrespLog.filePattern = /RequestResponseMessage-%1.log
appender.reqrespLog.filter.threshold.type = ThresholdFilter
appender.reqrespLog.filter.threshold.level=ALL
appender.reqrespLog.layout.charset = UTF-8
appender.reqrespLog.layout.type = PatternLayout
appender.reqrespLog.layout.pattern = %d : %m%n
appender.reqrespLog.policies.type = Policies
appender.reqrespLog.policies.size.type = SizeBasedTriggeringPolicy
appender.reqrespLog.policies.size.size = 10MBWith OSGi
com.dwl.base.logging.ReqRespLogger interface.
However you must configure that logger using the following blueprint
type file:<service id="RequestResponseLogger" ranking="10"
interface="com.ibm.mdm.common.servicefactory.api.CommonServiceFactory">
<service-properties>
<entry key="common.service" value="com.dwl.base.logging.ReqRespLogger"/>
</service-properties>
<bean class="com.ibm.mdm.common.servicefactory.CommonServiceFactoryImpl">
<argument type="java.lang.Class"
value="com.dwl.base.logging.ReqRespLogger"/>
<argument type="java.lang.Class"
value="x.y.z.MyNewReqRespLogger" />
<argument ref="blueprintBundle"/>
</bean>
</service>By including the ranking="10", you will ensure that your request response logger will supersede the InfoSphere MDM default request response logger.