casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
casa::LogFilter Class Reference

Filter LogMessages on message priority. More...

#include <LogFilter.h>

Inheritance diagram for casa::LogFilter:

List of all members.

Public Member Functions

 LogFilter (LogMessage::Priority lowest=LogMessage::NORMAL)
 Construct a filter with the LOWEST priority that you want passed.
 LogFilter (const LogFilter &other)
 Copy other to this.
LogFilteroperator= (const LogFilter &other)
virtual ~LogFilter ()

virtual LogFilterclone () const
 Clone the object.
virtual Bool pass (const LogMessage &message) const
 Return True if message passes this filter.
LogMessage::Priority lowestPriority () const
 Return the lowest priority which will pass this filter.

Private Attributes

LogMessage::Priority lowest_p

Detailed Description

Filter LogMessages on message priority.

Intended use:

Public interface

Review Status

Reviewed By:
Date Reviewed:
Test programs:
Demo programs:



Log[Message] Filter.


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.


Suppose we wanted to change the global sink so that it prints all messages, including debugging messages:


Definition at line 83 of file LogFilter.h.

Constructor & Destructor Documentation

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.

Copy other to this.

virtual casa::LogFilter::~LogFilter ( ) [virtual]


Member Function Documentation

virtual LogFilter* casa::LogFilter::clone ( ) const [virtual]

Clone the object.

Implements casa::LogFilterInterface.

Return the lowest priority which will pass this filter.

Definition at line 115 of file LogFilter.h.

References lowest_p.

LogFilter& casa::LogFilter::operator= ( const LogFilter other)
virtual Bool casa::LogFilter::pass ( const LogMessage message) const [virtual]

Return True if message passes this filter.

Implements casa::LogFilterInterface.

Member Data Documentation

Definition at line 111 of file LogFilter.h.

Referenced by lowestPriority().

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