Sample configuration for masking sensitive data
The following sample configuration customizes the out-of-the-box log4j1 configuration, creates two sets of regular expression patterns, and associates them to Layout and Filter specifications.
Create a custom log4jconfig.xml file for each tenant and override the below mentioned yfs property in the <INSTALL_DIRruntime_sandbox>/properties/customer_ overrides.properties file. In addition, copy the contents of the out-of-the-box log4j1 configuration XML file to the custom XML file. For example,
log4j.configuration=resources/extn/log4jconfig.xml
<appender name="ALL" class="com.sterlingcommerce.woodstock.util.frame.logex.SCIAppender">
<param name="rotateLogs" value="false" />
<param name="maxLogSize" value="100000" />
<param name="file" value="C:/Runtime/logs/sci.log" />
<layout class="com.sterlingcommerce.woodstock.util.frame.logex.SCIFilteredPatternLayout">
<param name="ConversionPattern" value="%d:%-7p:%t: %-60m[%X{AppUserId}]: %-25c{1}%n"/>
<param name="FilterSet" value="tenant1-common-filter"/>
</layout>
<filter class="com.sterlingcommerce.woodstock.util.frame.logex.SCIPatternFilter">
<param name="FilterSet" value="tenant1-suppress-filter" />
</filter>
</appender>
Sterling Order Management System Software provides logfilter.properties property file to define the filters as a set of named regular expressions. Define the filters by overriding the properties provided in the logfilter.properties file in the<INSTALL_DIR>/properties/customer_ overrides.properties file.
filterset.tenant1-common-filter.pattern.1=(Password|CVV|CreditCardNo)\\s*=\\s*(["']).*?\\2
filterset.tenant1-common-filter.replace.1=$1=****
filterset.tenant1-suppress-filter.pattern.1=(?i)@creditcardno
filterset.tenant1-suppress-filter.pattern.2=(?i)@secureauthenticationcode
filterset.<tenant specific filter>.includes=<common filter 1>,<common filter 2>,...
paymentFilter
pattern in tenant1's common
filter.filterset.tenant1-common-filter.includes=paymentFilter
default.layout.filterset=tenant1-common-filter
default.filter.filterset=tenant1-suppress-filter