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

Default log handler. More...

#include <OxygenEngine/io/logger.h>

Inheritance diagram for oe::io::DefaultLogHandler:
Collaboration diagram for oe::io::DefaultLogHandler:

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::io::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::io::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::io::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::io::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
io::Logger & log
Global logger instance.
Parameters
messageMessage sent by the logger
levelLevel of log

Implements oe::io::LogHandler.


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