|
networkservice
|
Print logs to help understanding what the service is doing. More...
#include "service/plugins/ILogger.h"

Public Member Functions | |
| ILogger ()=default | |
| virtual | ~ILogger ()=default |
| ILogger (const ILogger &)=delete | |
| ILogger & | operator= (const ILogger &)=delete |
| ILogger (ILogger &&)=delete | |
| ILogger & | operator= (ILogger &&)=delete |
| virtual void | debug (const std::string &message) const =0 |
| Print debug-level logs. More... | |
| virtual void | info (const std::string &message) const =0 |
| Print info-level logs. More... | |
| virtual void | warn (const std::string &message) const =0 |
| Print warning-level logs. More... | |
| virtual void | error (const std::string &message) const =0 |
| Print error-level logs. More... | |
Print logs to help understanding what the service is doing.
This class is the high level interface that must be implemented by logger plugin. The core service depends on it and not on its implementation(s) to respect the Dependency Inversion Principle. The logger plugin is thus free to output logs wherever it wants:
|
default |
Class constructor
|
virtualdefault |
Class destructor made virtual because it is used as base class by derived classes in logger plugin
|
delete |
Class copy constructor
|
delete |
Class move constructor
|
pure virtual |
Print debug-level logs.
Debug logs are for debugging purposes; reserved to developer. It means that something normal and insignificant happened. Many problems can usually be resolved using a debugger but developers are sometimes stuck with these logs. It can be used to have some more details (compared to INFO) about what the application is doing and better isolate issues especially during the development phase.
General usage (not necessarily related to this project but can ease understanding):
| message | The log message to print |
Implemented in service::plugins::logger::Logger.
|
pure virtual |
Print error-level logs.
Error logs require a particular attention from the developer. They indicate that something unexpected occurred. The application faces a significant problem that can make it stop working and affect, in some way, the user experience. A fix might be expected.
General usage (not necessarily related to this project but can ease understanding):
| message | The log message to print |
Implemented in service::plugins::logger::Logger.
|
pure virtual |
Print info-level logs.
Informational logs the developer would like to see when analyzing an issue. It means that something normal but significant happened. To use this log level effectively, just ask yourself which kind of informations would be useful for diagnosing your application and to quite easily understand what it is doing.
General usage (not necessarily related to this project but can ease understanding):
| message | The log message to print |
Implemented in service::plugins::logger::Logger.
Class copy-assignment operator
Class move-assignment operator
|
pure virtual |
Print warning-level logs.
Warning logs are for problems that are not necessarily important. They indicate that something unexpected occurred. The application faces a potential problem that does not affect the user experience and also does not prevent it from keeping working. Warning logs are sometimes a sign of an incoming failure.
General usage (not necessarily related to this project but can ease understanding):
| message | The log message to print |
Implemented in service::plugins::logger::Logger.
1.8.13