Question
Ford Motor Company
US
Last activity: 14 Jul 2016 16:23 EDT
Fliter is not working in the prlogging.xml
Hi,
We have implemented filter in our prlogging,xml to not write some content in the PegaRules logs.
After we deploy the updated prlogging.xml, still its writing those logs into PegaRules log.
Here the below custom change on PegaRules appenders,
Hi,
We have implemented filter in our prlogging,xml to not write some content in the PegaRules logs.
After we deploy the updated prlogging.xml, still its writing those logs into PegaRules log.
Here the below custom change on PegaRules appenders,
<appender name="PEGA" class="com.pega.apache.log4j.RollingFileAppender">
<param name="MaxFileSize" value="25MB"/>
<param name="MaxBackupIndex" value="5"/>
<param name="File" value="${pega.logdir}_PegaRULES.log"/>
<layout class="com.pega.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%20.20t] [%10.10X{pegathread}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n"/>
</layout>
<filter class="com.pega.apache.log4j.varia.StringMatchFilter">
<param name="StringToMatch" value="Violation of PRIMARY KEY constraint 'pr_Ford_FW_Data_DMSRequestXMLFiles_PK'" />
<param name="AcceptOnMatch" value="false" />
</filter>
</appender
We are running PRPC 6.2sp2, do we need add any more entry in the prlogging.xml?
Regards,
Anandh
***Mod edit- Included Category***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
SG
It maybe an issue with matching the string. Can you try it with just pr_Ford_FW_Data_DMSRequestXMLFiles_PK. Ensure the single quote around it is not included.
Regards
Patrick
Ford Motor Company
US
Hi Patrick,
Still i see the logs on the PegaRules log, we dont want those logs to captured. Its unnecessary filling those logs.
Do i missing anything in the prlogging.xml?
Regards,
Anandh
Pegasystems Inc.
US
Is this file name actually different than what is being used for your PegaRULES log?
<param name="File" value="${pega.logdir}_PegaRULES.log"/>
The appender name is PEGA, which is the default appender used for the PegaRULES log as well, so it doesn't seem like this is configured correctly. Can you provide your prlogging.xml file?
Ford Motor Company
US
Hi Nick,
Here the prlogging.xml,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<appender name="ASYNC" class="com.pega.apache.log4j.AsyncAppender">
<param name="BufferSize" value="512"/>
<param name="Blocking" value="false"/>
<filter class="com.pega.apache.log4j.varia.LevelMatchFilter">
<param name="LevelToMatch" value="ALERT"/>
<param name="AcceptOnMatch" value="false"/>
</filter>
<appender-ref ref="CONSOLE"/>
<appender-ref ref="PEGA"/>
<!-- Example of sending exceptions real-time with SOAP to AES -->
<appender-ref ref="EXCEPTION-AES-SOAP"/>
<appender-ref ref="HEALTH-ROOT"/>
</appender>
<appender name="ALERT-ASYNC" class="com.pega.apache.log4j.AsyncAppender">
<param name="BufferSize" value="512"/>
<param name="Blocking" value="false"/>
Hi Nick,
Here the prlogging.xml,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<appender name="ASYNC" class="com.pega.apache.log4j.AsyncAppender">
<param name="BufferSize" value="512"/>
<param name="Blocking" value="false"/>
<filter class="com.pega.apache.log4j.varia.LevelMatchFilter">
<param name="LevelToMatch" value="ALERT"/>
<param name="AcceptOnMatch" value="false"/>
</filter>
<appender-ref ref="CONSOLE"/>
<appender-ref ref="PEGA"/>
<!-- Example of sending exceptions real-time with SOAP to AES -->
<appender-ref ref="EXCEPTION-AES-SOAP"/>
<appender-ref ref="HEALTH-ROOT"/>
</appender>
<appender name="ALERT-ASYNC" class="com.pega.apache.log4j.AsyncAppender">
<param name="BufferSize" value="512"/>
<param name="Blocking" value="false"/>
<filter class="com.pega.apache.log4j.varia.LevelMatchFilter">
<param name="LevelToMatch" value="ALERT"/>
<param name="AcceptOnMatch" value="true"/>
</filter>
<filter class="com.pega.apache.log4j.varia.DenyAllFilter"/>
<appender-ref ref="ALERT-PERFORMANCE"/>
<appender-ref ref="ALERT-SECURITY"/>
</appender>
<appender name="ALERT-PERFORMANCE" class="com.pega.apache.log4j.AsyncAppender">
<param name="BufferSize" value="512"/>
<param name="Blocking" value="false"/>
<filter class="com.pega.pegarules.priv.MDCMatchFilter">
<param name="TagToMatch" value="alertType" />
<param name="StringToMatch" value="security" />
<param name="AcceptOnMatch" value="false"/>
</filter>
<appender-ref ref="ALERT"/>
<!-- Example of sending alerts real-time with SOAP to AES -->
<appender-ref ref="ALERT-AES-SOAP"/>
</appender>
<appender name="HEALTH-ROOT" class="com.pega.apache.log4j.AsyncAppender">
<filter class="com.pega.apache.log4j.varia.DenyAllFilter"/>
<appender-ref ref="HEALTH-ASYNC"/>
</appender>
<appender name="HEALTH-ASYNC" class="com.pega.apache.log4j.AsyncAppender">
<param name="BufferSize" value="512"/>
<param name="Blocking" value="false"/>
<appender-ref ref="HEALTH-SOAP"/>
</appender>
<appender name="ALERT-SECURITY" class="com.pega.apache.log4j.AsyncAppender">
<param name="BufferSize" value="512"/>
<param name="Blocking" value="false"/>
<filter class="com.pega.pegarules.priv.MDCMatchFilter">
<param name="TagToMatch" value="alertType" />
<param name="StringToMatch" value="security" />
<param name="AcceptOnMatch" value="true"/>
</filter>
<filter class="com.pega.apache.log4j.varia.DenyAllFilter"/>
<appender-ref ref="ALERTSECURITY"/>
</appender>
<appender name="CONSOLE" class="com.pega.apache.log4j.ConsoleAppender">
<layout class="com.pega.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%20.20t] [%10.10X{pegathread}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n"/>
</layout>
</appender>
<appender name="PEGA" class="com.pega.apache.log4j.RollingFileAppender">
<param name="MaxFileSize" value="25MB"/>
<param name="MaxBackupIndex" value="5"/>
<param name="File" value="${pega.logdir}_PegaRULES.log"/>
<layout class="com.pega.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%20.20t] [%10.10X{pegathread}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n"/>
</layout>
<filter class="com.pega.apache.log4j.varia.StringMatchFilter">
<param name="StringToMatch" value="Violation of PRIMARY KEY constraint pr_Ford_FW_Data_DMSRequestXMLFiles_PK" />
<param name="AcceptOnMatch" value="false" />
</filter>
</appender>
<appender name="ALERT" class="com.pega.apache.log4j.RollingFileAppender">
<param name="MaxFileSize" value="25MB"/>
<param name="MaxBackupIndex" value="5"/>
<param name="File" value="${pega.logdir}_PegaRULES-ALERT.log"/>
<layout class="com.pega.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%m%n" />
</layout>
</appender>
<!-- Example of sending events real-time with SOAP to AES -->
<appender name="EXCEPTION-AES-SOAP" class="com.pega.pegarules.priv.util.SOAPAppenderPega">
<param name="EndPointURL" value="" />
<param name="Mode" value="exception" />
<param name="ExceptionsOnly" value="true" />
<param name="allowLiveChanges" value="false"/>
<layout class="com.pega.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{GMT}*%Y{instance_id}*%t*%c*%X{RequestorId}*%X{pegathread}*%X{app}*%X{userid}*%X{stack}*%m%n"/>
</layout>
</appender>
<appender name="ALERT-AES-SOAP" class="com.pega.pegarules.priv.util.SOAPAppenderPega">
<param name="EndPointURL" value="" />
<param name="Mode" value="ALERT" />
<param name="allowLiveChanges" value="false"/>
<layout class="com.pega.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%m%n" />
</layout>
</appender>
<appender name="HEALTH-SOAP" class="com.pega.pegarules.priv.util.SOAPAppenderPega">
<param name="EndPointURL" value="" />
<param name="Mode" value="ALERT" />
<param name="allowLiveChanges" value="false"/>
<layout class="com.pega.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%m%n" />
</layout>
</appender>
<appender name="ALERTSECURITY" class="com.pega.apache.log4j.RollingFileAppender">
<param name="MaxFileSize" value="25MB"/>
<param name="MaxBackupIndex" value="5"/>
<param name="File" value="${pega.logdir}_PegaRULES-ALERTSECURITY.log"/>
<layout class="com.pega.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%20.20t] [%10.10X{pegathread}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n"/>
</layout>
</appender>
<appender name="SERVICES-PAL" class="com.pega.apache.log4j.RollingFileAppender">
<param name="MaxFileSize" value="25MB"/>
<param name="MaxBackupIndex" value="5"/>
<param name="File" value="${pega.logdir}_PegaRULES-SERVICES-PAL.csv"/>
<layout class="com.pega.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%8r [%t] %-5p %c - %m%n"/>
</layout>
</appender>
<category name="ServicePAL" additivity="false">
<priority value="info"/>
<appender-ref ref="SERVICES-PAL"/>
</category>
<category name="com.pega.pegarules.engine.database.DatabasePreparedStatement">
<priority value="warn"/>
</category>
<category name="com.pega.pegarules.engine.database.ImpExpLog">
<priority value="info"/>
</category>
<!-- Provided as an example for how to enable messaging for PRPC or java class.
<category name="Rule_Obj_Activity">
<priority value="info"/>
</category>
<category name="com.pega.pegarules.engine.context.InitialConfiguration">
<priority value="info"/>
</category>
-->
<!-- Provided as an example for how to enable logging for LookupLists in a separate file
<appender name="LOOKUPLIST-STAT" class="com.pega.pegarules.priv.util.FileAppenderPega">
<param name="FileNamePattern" value="'PegaRULES-LLCSTAT-'yyyy-MMM-dd'.csv'" />
<layout class="com.pega.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%m%n" />
</layout>
</appender>
<category
name="com.pega.pegarules.session.internal.stats.lookuplist.LookupListStats">
<priority value="info" />
<appender-ref ref="LOOKUPLIST-STAT" />
</category>
-->
<root>
<priority value="alert"/>
<appender-ref ref="ASYNC"/>
<appender-ref ref="ALERT-ASYNC"/>
</root>
</log4j:configuration>
Regads,
Anandh
Pegasystems Inc.
US
Hi Anandh,
Sorry, I misunderstood what you were trying to do. You want to filter out log messages with that string entirely (I thought you wanted to redirect them to another log).
I did some tests locally and was able to get this to work (with other strings). Are you certain the string you've entered exactly matches what you're trying to filter out? Can you provide a sample of the message?
Additionally, have you restarted the application after making the changes to prlogging.xml?
Ford Motor Company
US
Hi Nick,
Yes, we have restarted thoes JVMs after the change.
Here the below log message,we dont want to captured in the PegaRules log.
Hi Nick,
Yes, we have restarted thoes JVMs after the change.
Here the below log message,we dont want to captured in the PegaRules log.
2016-07-07 13:53:05,314 [PRPCWorkManager : 18] [ STANDARD] [rdOWSOneApp:01.01.05] (ProcessClaimRequestType.Action) ERROR - Error in RDB-Save com.pega.pegarules.pub.database.IntegrityConstraintViolationException: There was a problem getting a list: code: 2627 SQLState: 23000 Message: Violation of PRIMARY KEY constraint 'pr_Ford_FW_Data_DMSRequestXMLFiles_PK'. Cannot insert duplicate key in object 'dbo.DMSRequestXMLFiles'. The duplicate key value is (SP5367). From: (B0677E053DB3B0E0A630C6CCA60446549) SQL: INSERT INTO DMSRequestXMLFiles (pzInsKey,pxUpdateOpName,pxObjClass,pxCreateDateTime) VALUES( ?, ?,?,? ) SQL Inserts: <SP5367> <B0677E053DB3B0E0A630C6CCA60446549> <Ford-FW-OWS-Svc-ClaimLoad-ProcessClaimRequestType> <20160707T175305.308 GMT> Caused by SQL Problems. Problem #1, SQLState 23000, Error code 2627: com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'pr_Ford_FW_Data_DMSRequestXMLFiles_PK'. Cannot insert duplicate key in object 'dbo.DMSRequestXMLFiles'. The duplicate key value is (SP5367). at com.pega.pegarules.data.internal.access.ExceptionInformation.createExceptionDueToDBFailure(ExceptionInformation.java:165) at com.pega.pegarules.data.internal.access.DatabaseImpl.list(DatabaseImpl.java:5876) at com.pega.pegarules.data.internal.access.DatabaseImpl.executeRDB(DatabaseImpl.java:6253) at com.pega.pegarules.data.internal.access.DatabaseImpl.executeRDB(DatabaseImpl.java:6203) at com.pega.pegarules.data.internal.access.DatabaseImpl.saveRDB(DatabaseImpl.java:4977) at com.pegarules.generated.activity.ra_action_processbatchclaims_da8cb6da81f5bbc503cbdbbce75d618f.step4_circum0(ra_action_processbatchclaims_da8cb6da81f5bbc503cbdbbce75d618f.java:1091) at com.pegarules.generated.activity.ra_action_processbatchclaims_da8cb6da81f5bbc503cbdbbce75d618f.perform(ra_action_processbatchclaims_da8cb6da81f5bbc503cbdbbce75d618f.java:119) at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3078)
Regards,
Anandh
Pegasystems Inc.
US
Hmm, based on that it looks like what you've configured should work. I would suggest entering an SR for assistance with this.
Ford Motor Company
US
Sure Nick, before that I will redeploy the package and test and let you know.
Regards.
Anandh
Pegasystems Inc.
SG
Anandh,
It may be nothing, but I noticed that in your original query as well as the log dump above pr_Ford_FW_Data_DMSRequestXMLFiles_PK had single quotes arround it, however your xml configuration above it doesn't have single quote around it. Can you confirm that your string match is precisely as the log output?
Regards
Patrick
Ford Motor Company
US
Hi Patrick,
Yes,I have tried with both single quote and without quote, its not working on both case.
Here the log output,
2016-07-14 16:22:35,666 [PRPCWorkManager : 18] [ STANDARD] [rdOWSOneApp:01.01.05] (ProcessClaimRequestType.Action) ERROR - Error in RDB-Save com.pega.pegarules.pub.database.IntegrityConstraintViolationException: There was a problem getting a list: code: 2627 SQLState: 23000 Message: Violation of PRIMARY KEY constraint 'pr_Ford_FW_Data_DMSRequestXMLFiles_PK'. Cannot insert duplicate key in object 'dbo.DMSRequestXMLFiles'. The duplicate key value is (186584). From: (B5D44BF36C12FD3462FD93877D0602EB9) SQL: INSERT INTO DMSRequestXMLFiles (pzInsKey,pxUpdateOpName,pxObjClass,pxCreateDateTime) VALUES( ?, ?,?,? ) SQL Inserts: <186584> <B5D44BF36C12FD3462FD93877D0602EB9> <Ford-FW-OWS-Svc-ClaimLoad-ProcessClaimRequestType> <20160714T202235.662 GMT> Caused by SQL Problems. Problem #1, SQLState 23000, Error code 2627: com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'pr_Ford_FW_Data_DMSRequestXMLFiles_PK'. Cannot insert duplicate key in object 'dbo.DMSRequestXMLFiles'. The duplicate key value is (186584). at com.pega.pegarules.data.internal.access.ExceptionInformation.createExceptionDueToDBFailure(ExceptionInformation.java:165) at com.pega.pegarules.data.internal.access.DatabaseImpl.list(DatabaseImpl.java:5876)