Question
Raw SOAP Request Envelope Logging
User has a requirement to log all Raw SOAP Service Request Envelopes. Through searching the PDN they found that setting the Logging Level of the com.pega.pegarules.integration.engine.internal.services.soap.SOAPService logger to debug will achieve this functionality but we need a way to do this more gracefully and write them to their own personal log based on the service being invoked. They have two questions that pertain to two separate ideas for solving this issue: 1. Is the raw envelope present on the clipboard when the Service rule is first invoked before the Parse XML is applied and if so, where? If this is the case then they can simply use a data transform to store the raw message before applying parse logic. 2. Is there a way to update the prlogging.xml file in order to write service logging to a separate file than the main Pega logs and, if so, would it be possible to go even one step further and write each request to a separate log based on the service being invoked?
***Updated by moderator: Lochan to add Categories***
Yes you can configure prlogging.xml to write debug output from specific Rule/Classes to go to a separate file.
TYou essentially create a file appender and then for whatever classes you want have the output from those classes reference the new appender. In this example the output from ExtractImpl, ExtractParameters, and DatabaseUtilsCommonImpl are sent to the PegaBIX log.
<appender name="BIX" class="com.pega.pegarules.priv.util.DailySizeRollingFileAppenderPega">
<param name="FileNamePattern" value="'@{web.tmpdir}/PegaBIX-'yyyy-MMM-dd'.log'"/>
<param name="MaxFileSize" value="500MB" />
<layout class="com.pega.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%20.20t] [%20.20X{tenantid}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n"/>
</layout>
</appender>
<category name="com.pega.pegarules.data.internal.access.ExtractImpl" additivity="false">
<priority value="debug"/>
<appender-ref ref="BIX"/>
</category>
<category name="com.pega.pegarules.data.internal.access.ExtractParameters" additivity="false">
<priority value="debug"/>
<appender-ref ref="BIX"/>
</category>
<category name="com.pega.pegarules.data.internal.access.DatabaseUtilsCommonImpl" additivity="false">
<priority value="info"/>
<appender-ref ref="BIX"/>
</category>
FYI-- http://pdn.pega.com/node/341841 describes turning on wire debug to print SOAP messages into the log file.