Loading...
Searching...
No Matches
casacore::LogFilterTaql Class Reference
tables package (libcasa_tables) » LogTables_module

More...

`#include <LogFilterTaql.h>`

## Public Member Functions

| LogFilterTaql (const String &expr)
| Construct a filter from a TaQL expression.
| LogFilterTaql (const LogFilterTaql &other)
| Copy other to this.
LogFilterTaql & | operator= (const LogFilterTaql &other)
virtual | ~LogFilterTaql ()
virtual LogFilterTaql * | clone () const
| Clone the object.
virtual Bool | pass (const LogMessage &message) const
| Return True if message passes this filter.
Public Member Functions inherited from casacore::LogFilterInterface
| LogFilterInterface ()
| Construct a filter with the LOWEST priority that you want passed.
virtual | ~LogFilterInterface ()

## Private Attributes

LogFilterExpr * | expr_p

## Detailed Description

Filter LogMessages using a TaQL expression.

### Intended use:

Public interface

### Review Status

Reviewed By:
  wbrouw
Date Reviewed:
  1996/08/21
Test programs:
  tLogging
Demo programs:
  dLogging

### Prerequisite

- LogMessage

### 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);
casacore::LogFilter
Definition LogFilter.h:82
casacore::LogMessage::DEBUGGING
@ DEBUGGING
Low priority - primarily used for findding problems or tracing execution.
Definition LogMessage.h:105
casacore::LogSinkInterface::filter
virtual const LogFilterInterface & filter() const
Get/set the filter.
casacore::LogSink::globalSink
static LogSinkInterface & globalSink()
Get/set the global sink or check if the global sink is null.
casacore::all
LatticeExprNode all(const LatticeExprNode &expr)

### Motivation

Definition at line 84 of file LogFilterTaql.h.

## Constructor & Destructor Documentation

## LogFilterTaql() [1/2]

casacore::LogFilterTaql::LogFilterTaql | ( | const String & | expr | ) |

explicit

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

Referenced by clone(), LogFilterTaql(), and operator=().

## LogFilterTaql() [2/2]

casacore::LogFilterTaql::LogFilterTaql | ( | const LogFilterTaql & | other | ) |

Copy other to this.

References LogFilterTaql().

## ~LogFilterTaql()

virtual casacore::LogFilterTaql::~LogFilterTaql | ( |  | ) |

virtual

## Member Function Documentation

## clone()

virtual LogFilterTaql * casacore::LogFilterTaql::clone | ( |  | ) | const

virtual

Clone the object.

Implements casacore::LogFilterInterface.

References LogFilterTaql().

## operator=()

LogFilterTaql & casacore::LogFilterTaql::operator= | ( | const LogFilterTaql & | other | ) |

References LogFilterTaql().

## pass()

virtual Bool casacore::LogFilterTaql::pass | ( | const LogMessage & | message | ) | const

virtual

Return True if message passes this filter.

Implements casacore::LogFilterInterface.

## Member Data Documentation

## expr_p

LogFilterExpr* casacore::LogFilterTaql::expr_p

private

Definition at line 109 of file LogFilterTaql.h.

The documentation for this class was generated from the following file:

- tables/LogTables/LogFilterTaql.h