![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/PluginFramework/service/log/ctkLogService.h>
Public Member Functions | |
| virtual int | getLogLevel () const =0 |
| virtual void | log (const ctkServiceReference &sr, int level, const QString &message, const std::exception *exception=0, const char *file=0, const char *function=0, int line=-1)=0 |
| virtual void | log (int level, const QString &message, const std::exception *exception=0, const char *file=0, const char *function=0, int line=-1)=0 |
| virtual | ~ctkLogService () |
Static Public Attributes | |
| static const int | LOG_DEBUG |
| static const int | LOG_ERROR |
| static const int | LOG_INFO |
| static const int | LOG_WARNING |
Provides methods for plugins to write messages to the log.
ctkLogService methods are provided to log messages; optionally with a ctkServiceReference object or an exception.
Plugins must log messages in the Plugin Framework with a severity level according to the following hierarchy:
Definition at line 54 of file ctkLogService.h.
|
inlinevirtual |
Definition at line 57 of file ctkLogService.h.
|
pure virtual |
Get the current log level. The log service discards log entries with a level that is less severe than the current level. E.g. if the current log level is LOG_WARNING then the log service will discard all log entries with level LOG_INFO and LOG_DEBUG.
|
pure virtual |
Logs a message associated with a specific ctkServiceReference object.
The Exception field of the ctkLogEntry will be set to null.
| sr | The ctkServiceReference object of the service that this message is associated with. |
| level | The severity of the message. This should be one of the defined log levels but may be any integer that is interpreted in a user defined way. |
| message | Human readable string describing the condition. |
| exception | The exception that reflects the condition or null. |
| file | The current file name. |
| function | The current function name. |
| line | The current line number. |
|
pure virtual |
Logs a message.
The ctkServiceReference field and the Exception field of the ctkLogEntry object will be set to null.
| level | The severity of the message. This should be one of the defined log levels but may be any integer that is interpreted in a user defined way. |
| message | Human readable string describing the condition. |
| exception | The exception that reflects the condition or null. |
| file | The current file name. |
| function | The current function name. |
| line | The current line number. |
|
static |
A debugging message (Value 4).
This log entry is used for problem determination and may be irrelevant to anyone but the plugin developer.
Definition at line 93 of file ctkLogService.h.
|
static |
An error message (Value 1).
This log entry indicates the plugin or service may not be functional.
Definition at line 66 of file ctkLogService.h.
|
static |
An informational message (Value 3).
This log entry may be the result of any change in the plugin or service and does not indicate a problem.
Definition at line 84 of file ctkLogService.h.
|
static |
A warning message (Value 2).
This log entry indicates a plugin or service is still functioning but may experience problems in the future because of the warning condition.
Definition at line 75 of file ctkLogService.h.