|
|
Namespace for status messages such as for logging and errors. This namespace also keeps all the default definitions and helper functions dealing with the status message classes.
See also: StatusMsg, Log, Error
enum |
Enumeration for keeping track of a log's priority level. This enum has two functions:
The first is selecting what types of logs are displayed. This is set by a Log::Log constructor or the Log::setLogLevel method.
NONE: Will not display log messages. LOW : Will display all log messages expect NONE (LOW, MED, & HIGH). MED : Will display log messages with more detail (MED & HIGH). HIGH: Will display only the essential log messages (HIGH). |
The second is to assign a priority level to a log message. This is set by the Log::operator() method.
NONE: Log message will not be displayed (making it useless). LOW : Log message is of little value. It is more for tracing through the program internally (useful mostly for developers). MED : Log message represents more detail compared to HIGH level log messages such as pointing out some potential problems. HIGH: Log message is of great importance by pointing out major operations. |
enum |
Enumeration for keeping track of an error's severity level.
SUCCESS : No errors were recorded which is the default state. MINOR : Error is of something that can possible happen but is not desired. No error message is displayed and program execution continues on. MAJOR : Error is of something that is not suppose to happen but should not cripple the program. So the error message is displayed and program execution continues on. CRITICAL: Error is of something that should not happen at all and program execution will terminate immediately. |
const short |
Default header size: [5]
const short |
Default message body size: [38]
const char |
Default divider between message body and header: [" "]
const char |
Default message header border: ["|"]
const char |
Default message header boarder for errors: ["="]
const char |
Default message body: ["<Default Message>"]
const char |
Default header for status messages: ["MSG"]
const char |
Default header for log messages: ["LOG"]
const char |
Default header for error messages: ["ERROR"]
const char |
Default left bracket used for message arguments: ["["]
const char |
Default right bracket used for message arguments: ["]"]
const char |
String to represent a NULL string: [""]
This base class is responsible for storing, handling, and printing status messages which consists of a header and message body. This primarily helps in simplifying the task of displaying system messages to the user and/or developer.
To make the output formating of all status messages work together, global variables were created to handle the message header and body sizes. Therefore when one of these change, it effects all status messages which use the StatusMsg base class.
This class is a superset of StatusMsg responsible for handling log messages. This class is very helpful in that it allows easy tracking of program execution where log messages can be assigned different levels of importance.
see LogLevel
The Error class is a superset of StatusMsg responsible for handling error messages which can have different levels of severity. This class gives an easy object oriented way of handling errors within a program and is found to be much easier to deal with compared to exceptions.
Chances are all error messages within a program will want to be directed to one particular output and have the same header, therefore the Error ostream and error message header has been defined as global. This allows for the ability to easily redefine the location of error outputs for all Error objects with just one method call to setOutput .
bool |
Helper function to allow compares between error levels.
see ErrLevel
Generated on Fri Mar 9 02:04:42 2001, using kdoc 2.0a43. |