An interface for logging error messages.
More...
#include <error_logger.hpp>
|
| error_logger_t ()=default |
|
virtual | ~error_logger_t () noexcept=default |
|
virtual void | log (const char *file_name, unsigned int line, const std::string &message)=0 |
| A method for logging message. More...
|
|
An interface for logging error messages.
- Since
- v.5.5.0
- Examples:
- so_5/custom_error_logger/main.cpp.
◆ error_logger_t() [1/2]
◆ error_logger_t() [2/2]
so_5::error_logger_t::error_logger_t |
( |
| ) |
|
|
default |
◆ ~error_logger_t()
virtual so_5::error_logger_t::~error_logger_t |
( |
| ) |
|
|
virtualdefaultnoexcept |
◆ log()
virtual void so_5::error_logger_t::log |
( |
const char * |
file_name, |
|
|
unsigned int |
line, |
|
|
const std::string & |
message |
|
) |
| |
|
pure virtual |
A method for logging message.
- Note
- This method is not noexcept. It means that logger can throws, but in most cases logger is called in cases when the application is prepared to be aborted due to some fatal errors. In those cases an exception from log() will just terminate the application a bit earlier. In other cases exceptions thrown by log() will be ignored.
- Parameters
-
file_name | Source file name. |
line | Line number inside source file. |
message | Text to log. |
Implemented in so_5::stderr_logger_t.
- Examples:
- so_5/custom_error_logger/main.cpp.
◆ operator=()
The documentation for this class was generated from the following file: