Loading...
Searching...
No Matches
casacore::LogFilterInterface Class Referenceabstract
casa package (libcasa_casa) » Logging_module » Logging_module_internal_classes

More...

`#include <LogFilterInterface.h>`

## Public Member Functions

| LogFilterInterface ()
| Construct a filter with the LOWEST priority that you want passed.
virtual | ~LogFilterInterface ()
virtual LogFilterInterface * | clone () const =0
| Clone the object.
virtual Bool | pass (const LogMessage &message) const =0
| Return True if message passes this filter.

## Private Member Functions

| LogFilterInterface (const LogFilterInterface &other)
| Copy constructor and assignment cannot be used.
LogFilterInterface & | operator= (const LogFilterInterface &other)

## Detailed Description

Abstract base class for filtering LogMessages.

### Intended use:

Internal

### 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 81 of file LogFilterInterface.h.

## Constructor & Destructor Documentation

## LogFilterInterface() [1/2]

casacore::LogFilterInterface::LogFilterInterface | ( |  | ) |

inline

Construct a filter with the LOWEST priority that you want passed.

Thus DEBUGGING passes everything. Note that it is not possible to block SEVERE level messages, although you can use a NullLogSink which will have this effect.

Definition at line 89 of file LogFilterInterface.h.

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

## ~LogFilterInterface()

virtual casacore::LogFilterInterface::~LogFilterInterface | ( |  | ) |

virtual

## LogFilterInterface() [2/2]

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

private

Copy constructor and assignment cannot be used.

References LogFilterInterface().

## Member Function Documentation

## clone()

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

pure virtual

Clone the object.

Implemented in casacore::LogFilter, and casacore::LogFilterTaql.

References LogFilterInterface().

## operator=()

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

private

References LogFilterInterface().

## pass()

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

pure virtual

Return True if message passes this filter.

Implemented in casacore::LogFilter, and casacore::LogFilterTaql.

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

- casa/Logging/LogFilterInterface.h