Handles log messages.
More...
#include <OxygenEngine/core/logger.h>
|
virtual void | write (const std::string &message, const LogLevel level)=0 |
| Do actions when the logger need to write a message.
|
|
virtual bool | canWrite (const LogLevel level, const LogVerbosity verbosity) |
| Check if the handler will write according to the the level and verbosity.
|
|
|
bool | write_stdout = true |
| Indicate to the handler that the message should be sent to stdout / stderr.
|
|
bool | write_file = false |
| Indicate to the handler that the message should be written in a file.
|
|
|
Logger * | _logger = nullptr |
| Logger instance bound to this handler.
|
|
Handles log messages.
This class is used to take the log messages and send them to ... anything you want
- See also
- DefaultLogHandler for the handler that send log messages to stdout
◆ canWrite()
Check if the handler will write according to the the level and verbosity.
- Note
- This function is not set as
const
to allow user overrides' to change behavior / internal state based on level / verbosity
-
In fact, with creativity you can do anything with the verbosity flags
- Parameters
-
level | Log level |
verbosity | Log verbosity |
- Returns
- Let the log to be written or not by this handler
◆ write()
virtual void oe::core::LogHandler::write |
( |
const std::string & |
message, |
|
|
const LogLevel |
level |
|
) |
| |
|
pure virtual |
Do actions when the logger need to write a message.
- Parameters
-
message | Message sent by the logger |
level | Level of log sent by the logger |
Implemented in oe::core::DefaultLogHandler.
The documentation for this class was generated from the following file:
- OxygenEngine/core/logger.h