
Logging Facility
The logging facility provides you with a mechanism for generating and capturing messages generated by your application. These can be automatically saved to a log file, or intercepted and dealt with in some other way. The majority of functionality for this feature is provided by the OTC_Logger class in the OSE C++ class library.
Some of the features of the logging facility are optional and controlled via environment variables. You should consult the manual page for the OTC_Logger class and the general OSE C++ class library manual as a number of these features will not be described here or covered only briefly.
Logging a Message
The logging facility provides you with the ability to log a message string with a specified priority or level assigned to it. The level is analogous to that used by the UNIX function called "syslog()".
Level | Usage |
|
|
LOG_EMERGENCY | A panic condition. |
|
|
LOG_ALERT | A condition that should be corrected immediately, |
| such as a corrupted system database. |
|
|
LOG_CRITICAL | Critical conditions, such as hard device errors. |
|
|
LOG_ERROR | Errors. |
|
|
LOG_WARNING | Warning messages. |
|
|
13