29 #ifndef TABLES_TABLELOGSINK_H 30 #define TABLES_TABLELOGSINK_H 33 #include <casacore/casa/aips.h> 34 #include <casacore/casa/Logging/LogSink.h> 35 #include <casacore/casa/Logging/LogFilter.h> 36 #include <casacore/tables/Tables/Table.h> 37 #include <casacore/tables/Tables/ScalarColumn.h> 38 #include <casacore/tables/Tables/ArrayColumn.h> 39 #include <casacore/casa/Utilities/Assert.h> 40 #include <casacore/casa/Exceptions/Error.h> virtual Bool postLocally(const LogMessage &message)
If the message passes the filter, write it to the log table.
void init(const String &fileName)
Initialize the object.
virtual String getPriority(uInt i) const
ScalarColumn< Double > time_p
Source code origin of the log message.
ScalarColumn< Double > & time()
Abstract base class for filtering LogMessages.
Create a new table - define shapes, data managers, etc.
ObjectID of distributed object that created the message (String).
virtual String getLocation(uInt i) const
const ScalarColumn< String > & roPriority() 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.
virtual const LogFilterInterface & filter() const
Get/set the filter.
const Table & table() const
Access to the actual log table and its columns.
ScalarColumn< String > & message()
virtual Double getTime(uInt i) const
Get given part of the i-th message from the sink.
TableLogSink & operator=(const TableLogSink &other)
static String localId()
Returns the id for this class...
const ScalarColumn< String > & roObjectID() const
virtual uInt nelements() const
Get number of messages in sink.
TableLogSink()
Undefined and inaccessible.
const ScalarColumn< String > & roLocation() const
Accepts LogMessages and posts them to some destination.
ScalarColumn< String > message_p
ScalarColumn< String > & location()
ScalarColumn< String > location_p
Origin.
Save log messages in a Casacore Table.
static TableDesc logTableDescription()
Description of the log table.
virtual String getMessage(uInt i) const
const ScalarColumn< String > & roMessage() const
Filter LogMessages on message priority.
ScalarColumn< String > & objectID()
bool Bool
Define the standard types used by Casacore.
String id() const
Returns the id of the LogSink in use...
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
void attachCols()
Attach the column objects and create unit keywor if needed.
ScalarColumn< String > & priority()
Priority
An "importance" which is assigned to each LogMessage.
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.
virtual void clearLocally()
Clear the local sink (i.e.
const ScalarColumn< Double > & roTime() const
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.
this file contains all the compiler specific defines
virtual String getObjectID(uInt i) 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. ...