Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Nz::Log Class Reference

Core class that represents a logger. More...

Public Member Functions

 NazaraStaticSignal (OnLogWrite, const String &)
 
 NazaraStaticSignal (OnLogWriteError, ErrorType, const String &, unsigned int, const char *, const char *)
 

Static Public Member Functions

static void Enable (bool enable)
 Enables the log. More...
 
static AbstractLoggerGetLogger ()
 Gets the logger. More...
 
static bool IsEnabled ()
 Checks whether or not the logging is enabled. More...
 
static void SetLogger (AbstractLogger *logger)
 Sets the logger. More...
 
static void Write (const String &string)
 Writes a string in the log. More...
 
static void WriteError (ErrorType type, const String &error, unsigned int line=0, const char *file=nullptr, const char *function=nullptr)
 Writes the error in the log. More...
 

Friends

class Core
 

Detailed Description

Core class that represents a logger.

Member Function Documentation

◆ Enable()

void Nz::Log::Enable ( bool  enable)
static

Enables the log.

Parameters
enableIf true, enables the log

◆ GetLogger()

AbstractLogger * Nz::Log::GetLogger ( )
static

Gets the logger.

Returns
An abstract pointer to the logger

◆ IsEnabled()

bool Nz::Log::IsEnabled ( )
static

Checks whether or not the logging is enabled.

Returns
true If logging is enabled

◆ SetLogger()

void Nz::Log::SetLogger ( AbstractLogger logger)
static

Sets the logger.

Parameters
loggerAbstractLogger to log

◆ Write()

void Nz::Log::Write ( const String string)
static

Writes a string in the log.

Parameters
stringString to log
See also
WriteError

◆ WriteError()

void Nz::Log::WriteError ( ErrorType  type,
const String error,
unsigned int  line = 0,
const char *  file = nullptr,
const char *  function = nullptr 
)
static

Writes the error in the log.

Parameters
typeType of the error
errorMessage of the error
lineLine of the error
fileFile of the error
functionFunction of the error
See also
Write

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