casa
$Rev:20696$
|
Save distributed log messages. More...
#include <TSLogSink.h>
Public Member Functions | |
TSLogSink () | |
Create an empty sink without a filter. | |
TSLogSink (LogMessage::Priority filter) | |
Create an empty sink with the given filter. | |
TSLogSink (const LogFilterInterface &filter) | |
TSLogSink (const TSLogSink &other) | |
Copy constructor (copy semantics). | |
TSLogSink & | operator= (const TSLogSink &other) |
Assignment (copy semantics). | |
virtual | ~TSLogSink () |
virtual Bool | postLocally (const LogMessage &message) |
If the message passes the filter, write it. | |
String | id () const |
Returns the id of the LogSink in use..\. | |
const LogFilterInterface & | filter () const |
Get/set the filter. | |
LogSinkInterface & | filter (const LogFilterInterface &newfilter) |
void | cerrToo (Bool) |
Write to cerr too. | |
void | setLogSink (String logname="") |
Static Public Member Functions | |
static String | localId () |
Returns the id for this class..\. | |
Private Member Functions | |
void | copy_other (const TSLogSink &other) |
Avoid duplicating code in copy ctor and assignment operator. | |
Private Attributes | |
LogSinkInterface * | logsink |
Bool | send2cerr |
std::ofstream * | logfile |
Save distributed log messages.
Public interface
This class posts messages which pass the filter to a distributed logger.
See (see (file="Logging.h"))Logging.h .
For a distributed systems log messages.
Definition at line 77 of file TSLogSink.h.
casa::TSLogSink::TSLogSink | ( | ) |
Create an empty sink without a filter.
casa::TSLogSink::TSLogSink | ( | LogMessage::Priority | filter | ) | [explicit] |
Create an empty sink with the given filter.
casa::TSLogSink::TSLogSink | ( | const LogFilterInterface & | filter | ) | [explicit] |
casa::TSLogSink::TSLogSink | ( | const TSLogSink & | other | ) |
Copy constructor (copy semantics).
virtual casa::TSLogSink::~TSLogSink | ( | ) | [virtual] |
void casa::TSLogSink::cerrToo | ( | Bool | cerr2 | ) | [virtual] |
Write to cerr too.
Reimplemented from casa::LogSinkInterface.
void casa::TSLogSink::copy_other | ( | const TSLogSink & | other | ) | [private] |
Avoid duplicating code in copy ctor and assignment operator.
const LogFilterInterface& casa::TSLogSink::filter | ( | ) | const [virtual] |
Get/set the filter.
Reimplemented from casa::LogSinkInterface.
LogSinkInterface& casa::TSLogSink::filter | ( | const LogFilterInterface & | newfilter | ) | [virtual] |
Reimplemented from casa::LogSinkInterface.
String casa::TSLogSink::id | ( | ) | const [virtual] |
Returns the id of the LogSink in use..\.
Implements casa::LogSinkInterface.
static String casa::TSLogSink::localId | ( | ) | [static] |
Returns the id for this class..\.
Reimplemented from casa::LogSinkInterface.
virtual Bool casa::TSLogSink::postLocally | ( | const LogMessage & | message | ) | [virtual] |
If the message passes the filter, write it.
Implements casa::LogSinkInterface.
void casa::TSLogSink::setLogSink | ( | String | logname = "" | ) |
std::ofstream* casa::TSLogSink::logfile [private] |
Definition at line 117 of file TSLogSink.h.
LogSinkInterface* casa::TSLogSink::logsink [private] |
Definition at line 115 of file TSLogSink.h.
Bool casa::TSLogSink::send2cerr [private] |
Definition at line 116 of file TSLogSink.h.