■ log4j2
<apache tomcat dir>/webapps/<webapp dir>/WEB-INF/classes/log4j2.xml
을 편집하여 RegexFilter를 아래와 같이 적당한 위치에 삽입한다.
만일 RollingFile이 여러개일 경우 RollingFile 섹션마다 필터를 추가해 준다.
<!--- HPE WebInspect Log Filter -->
<RollingFile name="systemspec" fileName="${sys:testwebapp.log.path}/testwebapp.log" filePattern="${sys:testwebapp.log.path}/${date:yyyy-MM}/testwebapp-%d{MM-dd-yyyy}-%i.log">
...
<!--- HPE WebInspect Log Filter -->
<RegexFilter regex=".*172\.21\.90\.48.*" onMatch="DENY" onMismatch="NEUTRAL"/>
<RegexFilter regex=".*172\.21\.90\.49.*" onMatch="DENY" onMismatch="NEUTRAL"/>
...
</RollingFile>