Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
dcpp::ILogger Class Referenceabstract

Interface for logging messages, warnings and errors. More...

#include <duckcpp/core/engine/ILogger.hpp>

Inheritance diagram for dcpp::ILogger:
Inheritance graph
Collaboration diagram for dcpp::ILogger:
Collaboration graph

Public Member Functions

virtual ~ILogger ()
 Destructor.
 
virtual ELOG_LEVEL getLogLevel () const =0
 Returns the current set log level.
 
virtual void setLogLevel (ELOG_LEVEL ll)=0
 Sets a new log level.
 
virtual void log (const dcpp::char_kt *text, ELOG_LEVEL ll=ELL_INFORMATION)=0
 Prints out a text into the log.
 
virtual void log (const dcpp::char_kt *text, const dcpp::char_kt *hint, ELOG_LEVEL ll=ELL_INFORMATION)=0
 Prints out a text into the log.
 
virtual void log (const dcpp::char_kt *text, const wchar_t *hint, ELOG_LEVEL ll=ELL_INFORMATION)=0
 
virtual void log (const wchar_t *text, const wchar_t *hint, ELOG_LEVEL ll=ELL_INFORMATION)=0
 Prints out a text into the log.
 
virtual void log (const wchar_t *text, ELOG_LEVEL ll=ELL_INFORMATION)=0
 Prints out a text into the log.
 
- Public Member Functions inherited from dcpp::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
dcpp::int32_kt getReferenceCount () const
 Get the reference count.
 
const dcpp::char_ktgetDebugName () const
 Returns the debug name of the object.
 

Additional Inherited Members

- Protected Member Functions inherited from dcpp::IReferenceCounted
void setDebugName (const dcpp::char_kt *newName)
 Sets the debug name of the object.
 

Detailed Description

Interface for logging messages, warnings and errors.

Member Function Documentation

◆ log() [1/4]

virtual void dcpp::ILogger::log ( const dcpp::char_kt text,
const dcpp::char_kt hint,
ELOG_LEVEL  ll = ELL_INFORMATION 
)
pure virtual

Prints out a text into the log.

Parameters
textText to print out.
hintAdditional info. This string is added after a " :" to the string.
llLog level of the text. If the text is an error, set it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it is just an informational text, set it to ELL_INFORMATION. Texts are filtered with these levels. If you want to be a text displayed, independent on what level filter is set, use ELL_NONE.

◆ log() [2/4]

virtual void dcpp::ILogger::log ( const dcpp::char_kt text,
ELOG_LEVEL  ll = ELL_INFORMATION 
)
pure virtual

Prints out a text into the log.

Parameters
textText to print out.
llLog level of the text. If the text is an error, set it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it is just an informational text, set it to ELL_INFORMATION. Texts are filtered with these levels. If you want to be a text displayed, independent on what level filter is set, use ELL_NONE.

◆ log() [3/4]

virtual void dcpp::ILogger::log ( const wchar_t *  text,
const wchar_t *  hint,
ELOG_LEVEL  ll = ELL_INFORMATION 
)
pure virtual

Prints out a text into the log.

Parameters
textText to print out.
hintAdditional info. This string is added after a " :" to the string.
llLog level of the text. If the text is an error, set it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it is just an informational text, set it to ELL_INFORMATION. Texts are filtered with these levels. If you want to be a text displayed, independent on what level filter is set, use ELL_NONE.

◆ log() [4/4]

virtual void dcpp::ILogger::log ( const wchar_t *  text,
ELOG_LEVEL  ll = ELL_INFORMATION 
)
pure virtual

Prints out a text into the log.

Parameters
textText to print out.
llLog level of the text. If the text is an error, set it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it is just an informational text, set it to ELL_INFORMATION. Texts are filtered with these levels. If you want to be a text displayed, independent on what level filter is set, use ELL_NONE.

◆ setLogLevel()

virtual void dcpp::ILogger::setLogLevel ( ELOG_LEVEL  ll)
pure virtual

Sets a new log level.

With this value, texts which are sent to the logger are filtered out. For example setting this value to ELL_WARNING, only warnings and errors are printed out. Setting it to ELL_INFORMATION, which is the default setting, warnings, errors and informational texts are printed out.

Parameters
llnew log level filter value.

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

Duckcpp    @cppfx.xyz