Package org.jpos.util

Class FSDProtectedLogListener

  • All Implemented Interfaces:
    java.util.EventListener, Configurable, LogListener

    public class FSDProtectedLogListener
    extends java.lang.Object
    implements LogListener, Configurable
    Protects selected fields from LogEvents. FSDProtectedLogListener acts like a filter for Event logs, it should be defined _before_ other standard LogListeners such as SimpleLogListener or RotateLogListeners. It is based upon the ProtectedLogListener
    i.e.
    
     <logger name="Q2">
       <log-listener class="org.jpos.util.SimpleLogListener"/>
       <log-listener class="org.jpos.util.FSDProtectedLogListener">
         <property name="truncate" value="field1:100 field2:50" />
         <property name="protect" value="account-number track2-data" />
         <property name="wipe"    value="pinblock" />
       </log-listener>
       <log-listener class="org.jpos.util.RotateLogListener">
         <property name="file" value="/log/q2.log" />
         <property name="window" value="86400" />
         <property name="copies" value="5" />
         <property name="maxsize" value="1000000" />
       </log-listener>
     </logger>
     
    Order is important. In the previous example SimpleLogListener will dump unprotected LogEvents while RotateLogListener will dump protected ones (for selected fields)
    Since:
    jPOS 1.6.5
    See Also:
    Configurable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static byte[] BINARY_WIPED  
      static java.lang.String WIPED  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      LogEvent log​(LogEvent ev)  
      void setConfiguration​(Configuration cfg)
      Configure this FSDProtectedLogListener
      Properties:
      [protect] blank separated list of fields to be protected [wipe] blank separated list of fields to be wiped [truncate] blank separated list of fields:length to be truncated
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait