casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
casacore::NullLogSink Class Reference

Throw away all messages. More...

#include <NullLogSink.h>

Inheritance diagram for casacore::NullLogSink:
casacore::LogSinkInterface

Public Member Functions

 NullLogSink ()
 
 NullLogSink (LogMessage::Priority filter)
 
 NullLogSink (const LogFilterInterface &filter)
 
 NullLogSink (const NullLogSink &other)
 
NullLogSinkoperator= (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. More...
 
String id () const
 Returns the id of the LogSink in use... More...
 
- Public Member Functions inherited from casacore::LogSinkInterface
 LogSinkInterface ()
 Create with a NORMAL filter. More...
 
 LogSinkInterface (const LogFilterInterface &filter)
 Create with the supplied filter. More...
 
 LogSinkInterface (const LogSinkInterface &other)
 Copy semantics - copy the filter from other to this More...
 
LogSinkInterfaceoperator= (const LogSinkInterface &)
 
virtual ~LogSinkInterface ()
 
virtual const LogFilterInterfacefilter () const
 Get/set the filter. More...
 
virtual LogSinkInterfacefilter (const LogFilterInterface &filter)
 
virtual uInt nelements () const
 Get number of messages in sink. More...
 
virtual Double getTime (uInt i) const
 Get given part of the i-th message from the sink. More...
 
virtual String getPriority (uInt i) const
 
virtual String getMessage (uInt i) const
 
virtual String getLocation (uInt i) const
 
virtual String getObjectID (uInt i) const
 
virtual void flush (Bool global=True)
 Write any pending output. More...
 
virtual void writeLocally (Double time, const String &message, const String &priority, const String &location, const String &objectID)
 Write a message (usually from another logsink) into the local one. More...
 
virtual void clearLocally ()
 Clear the local sink (i.e. More...
 
virtual void cerrToo (bool cerr2)
 Write to cerr too. More...
 
void setTaskName (const String &theTask)
 

Static Public Member Functions

static String localId ()
 Returns the id for this class... More...
 
- Static Public Member Functions inherited from casacore::LogSinkInterface
static String localId ()
 Returns the id for this class... More...
 

Additional Inherited Members

- Protected Attributes inherited from casacore::LogSinkInterface
String taskName
 

Detailed Description

Throw away all messages.

Intended use:

Internal

Review Status

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

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 (see (file="Logging.h"))Logging.h.

Motivation

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

To Do

Definition at line 74 of file NullLogSink.h.

Constructor & Destructor Documentation

casacore::NullLogSink::NullLogSink ( )
casacore::NullLogSink::NullLogSink ( LogMessage::Priority  filter)
explicit
casacore::NullLogSink::NullLogSink ( const LogFilterInterface filter)
explicit
casacore::NullLogSink::NullLogSink ( const NullLogSink other)
casacore::NullLogSink::~NullLogSink ( )

Member Function Documentation

String casacore::NullLogSink::id ( ) const
virtual

Returns the id of the LogSink in use...

Implements casacore::LogSinkInterface.

static String casacore::NullLogSink::localId ( )
static

Returns the id for this class...

NullLogSink& casacore::NullLogSink::operator= ( const NullLogSink other)
virtual Bool casacore::NullLogSink::postLocally ( const LogMessage message)
virtual

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

Implements casacore::LogSinkInterface.


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