| Qore Logger Module Reference 1.0

Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Logger::LoggerFilterRegex Class Reference

Implements filtering according to a regular expression on the event message. More...

## Public Member Functions
| constructor (string regex_str='', bool regex_result=True)
| Creates the object.
int | eval (LoggerEvent event)
| Evaluates the regex and compares with the expected result.
string | getRegex ()
| Returns the current regex.
bool | getRegexResult ()
| Returns the expected result.
| setRegex (string regex_str, bool regex_result=True)
| Sets the regular expression and the expected result for the filter.

## Private Attributes
bool | regexResult
| expected result
string | regexStr
| regular string

## Detailed Description

Implements filtering according to a regular expression on the event message.

The rendered event message is tested using a regular expression, and if it does not match the expected result, then logging is rejected

## Member Function Documentation

## ◆ constructor()

Logger::LoggerFilterRegex::constructor | ( | string | regex_str = '',
|  | bool | regex_result = True )

Creates the object.

Parameters

  regex_str | the regular expression to use
  regex_result | True for a positive match, False for a negative match

## ◆ setRegex()

Logger::LoggerFilterRegex::setRegex | ( | string | regex_str,
|  | bool | regex_result = True )

Sets the regular expression and the expected result for the filter.

Parameters

  regex_str | the regular expression to use
  regex_result | True for a positive match, False for a negative match