|
|
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
|
Set log to default message and to display all log priority levels.
See also: StatusMsgs, StatusMsg
|
Set log to default header mainly telling function or location of logging within the program.
Parameters:
hdr | Header |
level | Default log level display setting: All except NONE |
ostr | Default ostream to output onto: clog |
See also: StatusMsgs, StatusMsg, LogLevel
operator |
[const]
Parameter passing operator to return the log level for assignments requiring an enum LogLevel value. This is helpful in passing a LogLevel parameter as the object name, such as Log instead of Log.getLogLevel().
see LogLevel
Returns: Current log level
void |
This method allows for "log(LogLevel,message)" operations which first performs a check to make sure that the log's message priority level is acceptable related to the level specified by a Log constructor. If it is, then the body message is set and printed.
Parameters:
level | Priority level of log message |
msg | Main message of log |
arg | Message argument of log (default: no argument) |
ostr | ostream to output onto. If none specified, then the ostream set by the Log constructor or setOutput method is used. Note that clog ostream will not work as an option to this method. |
void |
Same as above but handles an unsigned character for the argument
void |
Same as above but handles a character for the argument
void |
Same as above but handles an unsigned integer for the argument
void |
Same as above but handles an integer for the argument
void |
Same as above but handles an unsigned long for the argument
void |
Same as above but handles a long for the argument
void |
This overload operator is basically the same as the one above except this one is geared more towards lazy people who do not need to specify priority levels of log messages. The default LogLevel is HIGH, so when used in conjunction with the Log constructor with zero arguments, this method will print all logs.
Parameters:
msg | Main message of log |
arg | Message argument of log (default: no argument) |
ostr | ostream to output onto. If none specified, then the ostream set by the Log constructor or setOutput method is used. Note that clog ostream will not work as an option to this method. |
void |
Same as above but handles an unsigned long for the argument
void |
Same as above but handles an integer for the argument
void |
Same as above but handles an unsigned integer for the argument
void |
Same as above but handles a character for the argument
void |
Same as above but handles an unsigned character for the argument
void |
Same as above but handles a character string for the argument
void |
This method changes the default log level display setting which is originally set by a Log constructor.
see LogLevel
Parameters:
level | Log level display setting |
void |
This method changes the current output ostream.
Parameters:
newout | New ostream for log's default output |
LogLevel |
[const]
This method returns the log level display setting which is set by either the Log constructor or setLogLevel method.
see LogLevel
Returns: Current log level
Generated on Fri Mar 9 02:04:42 2001, using kdoc 2.0a43. |