NullLogSink.h

Classes

NullLogSink -- Throw away all messages. (full description)

class NullLogSink : public LogSinkInterface

Interface

Public Members
NullLogSink()
explicit NullLogSink(LogMessage::Priority filter)
explicit NullLogSink(const LogFilterInterface &filter)
NullLogSink(const NullLogSink &other)
NullLogSink &operator=(const NullLogSink &other)
~NullLogSink()
virtual Bool postLocally(const LogMessage &message)
static String localId( )
String id( ) const

Description

Review Status

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

Prerequisite

Etymology

Null as in "empty" or "/dev/null".

Synopsis

NullLogSink is a trivial LogSinkInterface which merely throws away all its messages. It is not intended to be used directly, rather it should be used through LogSink.

Example

See Logging.h.

Motivation

For testing, or to prevent multiply logging (local and global) to cerr (say).

To Do

Member Description

NullLogSink()

explicit NullLogSink(LogMessage::Priority filter)

explicit NullLogSink(const LogFilterInterface &filter)

NullLogSink(const NullLogSink &other)

NullLogSink &operator=(const NullLogSink &other)

~NullLogSink()

virtual Bool postLocally(const LogMessage &message)

Always throws the message away, but it does return True or False depending on whether or not message passes the filter.

static String localId( )

Returns the id for this class...

String id( ) const

Returns the id of the LogSink in use...