29#include <casacore/casa/aips.h>
30#include <casacore/casa/Logging/LogSinkInterface.h>
31#include <casacore/casa/Exceptions/Error.h>
32#include <casacore/casa/iosfwd.h>
164 const std::shared_ptr<LogSinkInterface>&);
Priority
An "importance" which is assigned to each LogMessage.
String id() const
Returns the id of the LogSink in use...
LogSink(const LogFilterInterface &filter, ostream *os, Bool useGlobalSink=True)
LogSink & localSink(LogSinkInterface *&fromNew)
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.
virtual String getLocation(uInt i) const
LogSink(const LogFilterInterface &filter, const String &fileName, Int n=0)
Temporary to avoid problem that the bool constructor is taken if a char* is passed.
LogSink(LogMessage::Priority, const Char *fileName, Int n=0)
static std::shared_ptr< LsiIntermediate > global_sink_p
LogSink(const LogFilterInterface &filter, const Char *fileName, Int n=0)
virtual String getMessage(uInt i) const
std::shared_ptr< LogSinkInterface > local_sink_p
LogSink & operator=(const LogSink &other)
virtual Bool postLocally(const LogMessage &message)
Send message to the local sink only.
LogSink(LogMessage::Priority filter, ostream *os, Bool useGlobalSink=True)
Log to an ostream.
virtual const LogFilterInterface & filter() const
Get or set the filter of this particular LogSink.
virtual void clearLocally()
Clear the local sink (i.e.
std::shared_ptr< LsiIntermediate > local_ref_to_global_p
The following is a reference to the global sink.
virtual LogSinkInterface & filter(const LogFilterInterface &filter)
virtual Double getTime(uInt i) const
Get given part of the i-th message from the local sink.
LogSink(const LogSink &other)
Make a referencing copy of other.
void postThenThrow(const LogMessage &message, const EXC &exc)
Post message and then throw an AipsError exception containing message.toString().
LogSink(const LogFilterInterface &filter, Bool nullSink=True)
const LogSinkInterface & localSink() const
Change the sink that this LogSink actually uses.
LogSink(LogMessage::Priority, const String &fileName, Int n=0)
static Bool postGlobally(const LogMessage &message)
Send message to the global sink only.
static LogSinkInterface & globalSink()
Get/set the global sink or check if the global sink is null.
LogSinkInterface & localSink()
virtual uInt nelements() const
Get number of messages in local sink.
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...
static Bool nullGlobalSink()
static void postGloballyThenThrow(const LogMessage &message)
Bool post(const LogMessage &message)
Send message to both the local and global sink.
LogSink(const LogFilterInterface &filter, const std::shared_ptr< LogSinkInterface > &)
Log to the given sink.
virtual String getObjectID(uInt i) const
static void createGlobalSink()
Create the global sink (attached to cerr).
virtual String getPriority(uInt i) const
static String localId()
Returns the id for this class...
virtual void flush(Bool global=True)
Write any pending output (by default also the global sink).
static std::once_flag theirCallOnceFlag
static void globalSink(LogSinkInterface *&fromNew)
void preparePostThenThrow(const LogMessage &message, const AipsError &x)
Prepare for postThenThrow function.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
TableExprNode time(const TableExprNode &node)
bool Bool
Define the standard types used by Casacore.