Groovy Documentation

org.linkedin.groovy.util.log
[Groovy] Class MaskDataPatternLayout

java.lang.Object
  org.apache.log4j.PatternLayout
      org.linkedin.groovy.util.log.MaskDataPatternLayout

class MaskDataPatternLayout
extends PatternLayout

Add support for filtering log message based on regex. This is mainly used to make sure we do not log sensitive information in log files. This is achieved by adding a new option '%w' (inverted m) that processed the message for filtering. In log4j config MaskingRegex should also be defined that contains these filters and actions as a groovy closure. Ex:

Authors:
mdubey@linkedin.com Created: Aug 2, 2010 12:57:15 PM


Property Summary
java.lang.String maskingRegex

 
Method Summary
void activateOptions()

protected PatternParser createPatternParser(java.lang.String pattern)

java.lang.String getMaskingRegex()

boolean ignoresThrowable()

void setMaskingRegex(java.lang.String maskingRegex)

 

Property Detail

maskingRegex

java.lang.String maskingRegex


 
Method Detail

activateOptions

@Override
void activateOptions()


createPatternParser

@Override
protected PatternParser createPatternParser(java.lang.String pattern)


getMaskingRegex

java.lang.String getMaskingRegex()


ignoresThrowable

@Override
boolean ignoresThrowable()


setMaskingRegex

void setMaskingRegex(java.lang.String maskingRegex)


 

Groovy Documentation