Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::core::DefaultLogHandler Class Reference

Default log handler. More...

#include <OxygenEngine/core/logger.h>

Inheritance diagram for oe::core::DefaultLogHandler:
[legend]
Collaboration diagram for oe::core::DefaultLogHandler:
[legend]

Public Member Functions

virtual void write (const std::string &message, const LogLevel level) override
 Write the log to stdout.
 
- Public Member Functions inherited from oe::core::LogHandler
virtual bool canWrite (const LogLevel level, const LogVerbosity verbosity)
 Check if the handler will write according to the the level and verbosity.
 

Additional Inherited Members

- Public Attributes inherited from oe::core::LogHandler
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.
 
- Protected Attributes inherited from oe::core::LogHandler
Logger_logger = nullptr
 Logger instance bound to this handler.
 

Detailed Description

Default log handler.

Sends log messages to stdout + optionaly write to a log file

Member Function Documentation

◆ write()

virtual void oe::core::DefaultLogHandler::write ( const std::string &  message,
const LogLevel  level 
)
overridevirtual

Write the log to stdout.

Prepends the date and the log level and output like this

[01/04/2022 16:47:31] [DEBUG]: Test log message
core::Logger & log
Parameters
messageMessage sent by the logger
levelLevel of log

Implements oe::core::LogHandler.


The documentation for this class was generated from the following file: