Skip to main content
Version: 5.7.x.x Java 8 ELS

LoggerFilter

LoggerFilter is used for general purposes. You can define a free form log line with access to ENV, HEADER, AUTH, ... variables.

Classname
ch::nevis::isiweb4::filter::audit::LoggerFilter
Library
libAuditFilter.so.1

Configuration

Enable

  • Type: Enum: on, off

  • Usage Constraint: optional, conditions are allowed

  • Supported pragams: break

  • Default: on

  • Syntax: on|off

  • Conditional enable logger, very useful when you only want to see certain requests in the log.

  • Sample:

    Condition:HEADER:Content-Type: application/x-www-form-urlencoded
    on
    off

    This sample enables the logger only for form posts requests. No other requests will be processed.

FileName

  • Type: String
  • Usage Constraint: required
  • Define the file name where the logger should write to.

RotationPolicy

  • Type: String
  • Usage Constraint: optional
  • Default: no rotation
  • Specifies the rotation policy.
    • size:<size in bytes>:<number of logfiles>
      • For example: "size:10000000:10" means 10 generations of 10MB logfiles
    • time: <hourly | daily | monthly>
      • Defines when to trigger the logfile rotation:
        • hourly: Rotate every full hour.
        • daily: Rotate at midnight.
        • monthly: Rotate on the first of every month (midnight).

LogLine

  • Type: String

  • Usage Constraint: optional

  • Defines the log line to print. You can use:

    • ENV:<enviroment-variable>
    • HEADER:<header-name>
    • AUTH:<auth-attribute-name>
    • others

    Be aware that variables must be closed with a ;.

  • Sample:

    A sample log line with env ENV:my_env; and header HEADER:Content-Type;"

    If my_env has the value anything and Content-Type is text/html, then this would result in the following log line:

    A sample log line with env anything and header text/html" 

AddTimeStamp

  • Type: Boolean
  • Usage Constraint: optional
  • Default: false
  • Setting this parameter to true will prefix each line with a timestamp.

OncePerSession

  • Type: Boolean
  • Usage Constraint: optional
  • Default: false
  • If you set this parameter to true, the log line will be traced only once per session.

OncePerSession.Key

  • Type: String

  • Usage Constraint: optional, advanced

  • This parameter defines the key used in the session to mark whether the log line has been traced. The system only evaluates this parameter if the parameter OncePerSession is set to true. You can use request parameters, such as ENV or AUTH, as parameter value. For example:

    ENV<enviroment-vaiable>

Example

See the chapter Configuring a log facility using filters.