LogFilterTaql.h

Classes

LogFilterTaql -- Filter LogMessages using a TaQL expression. (full description)

class LogFilterTaql : public LogFilterInterface

Interface

Public Members
explicit LogFilterTaql (const String& expr)
LogFilterTaql (const LogFilterTaql& other)
LogFilterTaql& operator= (const LogFilterTaql& other)
virtual ~LogFilterTaql()
virtual LogFilterTaql* clone() const
virtual Bool pass (const LogMessage& message) const

Description

Review Status

Reviewed By:
wbrouw
Date Reviewed:
1996/08/21
Programs:
Demos:
Tests:

Prerequisite

Etymology

Log[Message] Filter.

Synopsis

The LogFilter class is used by the various log sink classes, typically accessed through LogSink, to decide whether a particular LogMessage should be accepted or rejected.

Simple filtering is based on the messages priority. In particular, you typically will choose to only pass messages greater than or equal to NORMAL in priority, but you might choose DEBUGGING to see all messages, or SEVERE to only see messages that report serious problems.

Example

Suppose we wanted to change the global sink so that it prints all messages, including debugging messages:
    LogFilter all(LogMessage::DEBUGGING);
    LogSink::globalSink().filter(all);
    

Motivation

Member Description

explicit LogFilterTaql (const String& expr)

Construct a filter from a TaQL expression. Only messages matching the expression pass the filter. The field names that can be used in the expression are: TIME, PRIORITY, MESSAGE, LOCATION, OBJECT_ID. All fields are strings, expect for TIME which is a double (MJD in sec.).

LogFilterTaql (const LogFilterTaql& other)
LogFilterTaql& operator= (const LogFilterTaql& other)

Copy other to this.

virtual ~LogFilterTaql()

virtual LogFilterTaql* clone() const

Clone the object.

virtual Bool pass (const LogMessage& message) const

Return True if message passes this filter.