29 #ifndef TABLES_TABLELOGSINK_H
30 #define TABLES_TABLELOGSINK_H
virtual Bool postLocally(const LogMessage &message)
If the message passes the filter, write it to the log table.
virtual uInt nelements() const
Get number of messages in sink.
virtual String getObjectID(uInt i) const
void init(const String &fileName)
Initialize the object.
const ScalarColumn< String > & roMessage() const
ScalarColumn< Double > time_p
Source code origin of the log message.
const ScalarColumn< String > & roObjectID() const
ScalarColumn< Double > & time()
Abstract base class for filtering LogMessages.
const Table & table() const
Access to the actual log table and its columns.
Create a new table - define shapes, data managers, etc.
ObjectID of distributed object that created the message (String).
const ScalarColumn< String > & roLocation() const
Main interface class to a read/write table.
ScalarColumn< String > id_p
ObjectID.
void copy_other(const TableLogSink &other)
Avoid duplicating code in copy ctor and assignment operator.
ScalarColumn< String > & message()
TableLogSink & operator=(const TableLogSink &other)
virtual String getPriority(uInt i) const
static String localId()
Returns the id for this class...
TableLogSink()
Undefined and inaccessible.
virtual String getLocation(uInt i) const
Accepts LogMessages and posts them to some destination.
ScalarColumn< String > message_p
virtual String getMessage(uInt i) const
virtual Double getTime(uInt i) const
Get given part of the i-th message from the sink.
ScalarColumn< String > & location()
ScalarColumn< String > location_p
Origin.
Save log messages in a Casacore Table.
static TableDesc logTableDescription()
Description of the log table.
Filter LogMessages on message priority.
ScalarColumn< String > & objectID()
bool Bool
Define the standard types used by Casacore.
virtual const LogFilterInterface & filter() const
Get/set the filter.
Columns
Defines the minimal set of columns in the table (more may exist, but are ignored. ...
virtual void flush(Bool global=True)
Write out any pending output to the table.
ScalarColumn< String > priority_p
std::set< ScanKey > filter(const std::set< ScanKey > scans, const ArrayKey &arrayKey)
given a set of scan keys, return the subset that matches the given array key
void attachCols()
Attach the column objects and create unit keywor if needed.
ScalarColumn< String > & priority()
Priority
An "importance" which is assigned to each LogMessage.
const ScalarColumn< Double > & roTime() const
Distribute LogMessages to their destination(s)
void reopenRW(const LogFilterInterface &filter)
Reopen the logtable for read/write (if needed).
String: the storage and methods of handling collections of characters.
static LogSink makeSink(const String &fileName)
Make a LogSink for a TableLogSink with a new table.
Define the structure of a Casacore table.
String id() const
Returns the id of the LogSink in use...
virtual void clearLocally()
Clear the local sink (i.e.
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.
Informational log messages with with time, priority, and origin.
const ScalarColumn< String > & roPriority() const
void makeTable(SetupNewTable &)
Make a new log table.
static String columnName(Columns which)
Turn the Columns enum into a String which is the actual column name in the Table. ...
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.