Skip to main content
Version: 8.2511.x.x RR

LoggerFilter

LoggerFilter is used for general purposes. You can define a free form log line with access to internal variables.

For an example, see the chapter Configuring a log facility using filters.

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

Configuration

Enable

Type: Enum
Possible values: on, off
Usage Constraint: optional, conditional
Supported pragams: break
Default: on

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

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

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

FileName

Type: String
Usage Constraint: required

Define the file name where the logger should write to or call an external program with the syntax pipe://<external program>.

For example with this configuration:

pipe:///bin/sed -u -e "s/^/[LoggerFilter.log] /g" 

the log will be written in stdout prefixed with [LoggerFilter.log] for each line.

The RotationPolicy parameter below will only be evaluated if a filename is configured. If you configure pipe://... the RotationPolicy will be ignored.

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).

This parameter will only be evaulated if the FileName is a real file name and not a pipe.

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.