Go to the documentation of this file.
29 #ifndef CASA_LOGMESSAGE_H
30 #define CASA_LOGMESSAGE_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Logging/LogOrigin.h>
34 #include <casacore/casa/OS/Time.h>
35 #include <casacore/casa/iosfwd.h>
date and time enquiry functions, with some operations.
LogMessage(const LogOrigin &sourceLocation, Priority priority=NORMAL)
Create a message with the given location and priority, the current time and an empty message.
const String & message() const
Get the message text.
LogMessage & messageTime(const Time &theTime)
Normally you should not manually set the time, however there may be rare circumstances where it is us...
const Time & messageTime() const
Returns the time at which the message text was created.
Priority
An "importance" which is assigned to each LogMessage.
String toTermString() const
LogMessage & sourceLocation(const SourceLocation *where)
Set the source location - usually this will be called with the macro WHERE.
@ NORMAL5
Most messages users see should have this priority.
LogMessage & line(uInt which)
LogMessage & message(const String &message, Bool keepLastTime=False)
Set the message text.
Write a LogMessage to an ostream. Write a LogMessage as a string to an ostream. Merely calls LogMessa...
@ DEBUGGING
Low priority - primarily used for findding problems or tracing execution.
const LogOrigin & origin() const
Get and set the origin of this LogMessage.
LogMessage(const LogMessage &other)
Make this LogMessage a copy of other.
static const String & toString(Priority which)
Map the given priority into a String - so, for example, it can be stored in a table.
LogMessage(Priority priority=NORMAL)
Create a message with the given priority and the current time, and an empty origin and message.
Informational log messages with with time, priority, and origin.
Priority priority() const
Get or change the priority of this LogMessage.
void copy_other(const LogMessage &other)
Provide common implementation for copy constructor and assignment operator.
LogMessage & origin(const LogOrigin &origin)
LogOrigin: The source code location of the originator of a LogMessage.
@ SEVERE
Report on a problem detected by the software.
this file contains all the compiler specific defines
LogMessage(const String &message, const LogOrigin &sourceLocation, Priority=NORMAL)
Create a completely filled out LogMessage.
LogMessage & operator=(const LogMessage &other)
ostream & operator<<(ostream &os, const LogMessage &message)
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
String toString() const
Turn this entire LogMessage into a String.
uInt line() const
Get and set the line number in the LogOrigin.
LogMessage & priority(Priority which)
@ WARN
Use messages of warning level to flag things that are unusual and might well be errors.