![]() |
libimgdoc2
|
#include <IEnvironment.h>
Public Member Functions | |
virtual void | Log (int level, const char *message)=0 |
virtual bool | IsLogLevelActive (int level)=0 |
virtual void | ReportFatalErrorAndExit (const char *message)=0 |
IHostingEnvironment (const IHostingEnvironment &)=delete | |
IHostingEnvironment & | operator= (const IHostingEnvironment &)=delete |
IHostingEnvironment (IHostingEnvironment &&)=delete | |
IHostingEnvironment & | operator= (IHostingEnvironment &&)=delete |
In this class functionality "to be provided by a hosting environment" ist gathered. The prime example is "debug logging", which is a cross-cutting concern, and it is allowed to route debug print to the hosting environment.
|
pure virtual |
Queries if the specified log level is active. This method may be called concurrently. For possible values of the log level, see the constants "LogLevel".
level | The log level. |
|
pure virtual |
This method is used for debug output. It may be called concurrently. For possible values of the log level, see the constants "LogLevel".
level | The log level (c.f. constants "LogLevel..." for possible values). |
message | The message text (in UTF8-encoding). |
|
pure virtual |
Report fatal error and terminate the application. This is to be used for fatal error, where no recovery is possible. Obviously, this should be the last resort.
message | The message. |