29 #ifndef CASA_LOGSINK_H
30 #define CASA_LOGSINK_H
static void createGlobalSink()
Create the global sink (attached to cerr).
Abstract base class for filtering LogMessages.
TableExprNode time(const TableExprNode &node)
static String localId()
Returns the id for this class...
virtual const LogFilterInterface & filter() const
Get or set the filter of this particular LogSink.
String id() const
Returns the id of the LogSink in use...
virtual Bool postLocally(const LogMessage &message)
Send message to the local sink only.
LogSink(LogMessage::Priority filter=LogMessage::NORMAL, Bool nullSink=True)
Create a null local sink that throws all messages away or create a memory local sink that holds the m...
virtual String getPriority(uInt i) const
static LogSinkInterface & globalSink()
Get/set the global sink or check if the global sink is null.
void postThenThrow(const LogMessage &message, const EXC &exc)
Post message and then throw an AipsError exception containing message.toString(). ...
Accepts LogMessages and posts them to some destination.
CountedPtr< LsiIntermediate > local_ref_to_global_p
The following is a reference to the global sink.
Referenced counted pointer for constant data.
Bool post(const LogMessage &message)
Send message to both the local and global sink.
virtual void flush(Bool global=True)
Write any pending output (by default also the global sink).
static Bool postGlobally(const LogMessage &message)
Send message to the global sink only.
static void postGloballyThenThrow(const LogMessage &message)
void preparePostThenThrow(const LogMessage &message, const AipsError &x)
Prepare for postThenThrow function.
virtual uInt nelements() const
Get number of messages in local sink.
virtual String getObjectID(uInt i) const
bool Bool
Define the standard types used by Casacore.
static std::once_flag theirCallOnceFlag
CountedPtr< LogSinkInterface > local_sink_p
virtual String getMessage(uInt i) const
Priority
An "importance" which is assigned to each LogMessage.
Base class for all Casacore library errors.
Distribute LogMessages to their destination(s)
const LogSinkInterface & localSink() const
Change the sink that this LogSink actually uses.
String: the storage and methods of handling collections of characters.
static CountedPtr< LsiIntermediate > * global_sink_p
virtual void clearLocally()
Clear the local sink (i.e.
Informational log messages with with time, priority, and origin.
virtual String getLocation(uInt i) const
virtual Double getTime(uInt i) const
Get given part of the i-th message from the local sink.
static Bool nullGlobalSink()
LogSink & operator=(const LogSink &other)
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.