Logging functions

Logging functions.

Include: #include <dmsdk/dlib/log.h>
TYPES
dmLog:LogListener dmLog:LogListener callback typedef
ENUMS
LogSeverity Log severity
FUNCTIONS
void dmLogDebug(const char* format, ... args) log with "debug" severity
void dmLogUserDebug(const char* format, ... args) log with "user" severity
void dmLogInfo(const char* format, ... args) log with "info" severity
void dmLogWarning(const char* format, ... args) log with "warning" severity
void dmLogError(const char* format, ... args) log with "error" severity
void dmLogFatal(const char* format, ... args) log with "fatal" severity
void dmLogRegisterListener(FLogListener listener) register a log listener.
void dmLogUnregisterListener( [type:FLogListener]) unregister a log listener.
void dmLogSetLevel( [type:dmLog::Severity]) set log system severity level.
void dmLog::RegisterLogListener(FLogListener listener) register dmLog listener.
void dmLog::UnregisterLogListener( [type:FLogListener]) unregister dmLog listener.
void dmLog::Setlevel( [type:dmLog::Severity]) set log system severity level.
MACROS
DLIB_LOG_DOMAIN() macro for debug category logging

Functions

dmLogDebug

void dmLogDebug(const char* format, ... args)

Debug messages are temporary log instances used when debugging a certain behavior Use dmLogOnceDebug for one-shot logging

PARAMETERS

const char* format Format string
... args Format string args (variable arg list)

RETURNS

void

dmLogUserDebug

void dmLogUserDebug(const char* format, ... args)

Debug messages are temporary log instances used when debugging a certain behavior Use dmLogOnceUserDebug for one-shot logging

PARAMETERS

const char* format Format string
... args Format string args (variable arg list)

RETURNS

void

dmLogInfo

void dmLogInfo(const char* format, ... args)

Info messages are used to inform the developers of relevant information Use dmLogOnceInfo for one-shot logging

PARAMETERS

const char* format Format string
... args Format string args (variable arg list)

RETURNS

void

dmLogWarning

void dmLogWarning(const char* format, ... args)

Warning messages are used to inform the developers about potential problems which can cause errors. Use dmLogOnceWarning for one-shot logging

PARAMETERS

const char* format Format string
... args Format string args (variable arg list)

RETURNS

void

dmLogError

void dmLogError(const char* format, ... args)

Error messages are used in cases where an recoverable error has occurred. Use dmLogOnceError for one-shot logging

PARAMETERS

const char* format Format string
... args Format string args (variable arg list)

RETURNS

void

dmLogFatal

void dmLogFatal(const char* format, ... args)

Fatal messages are used in cases where an unrecoverable error has occurred. Use dmLogOnceFatal for one-shot logging

PARAMETERS

const char* format Format string
... args Format string args (variable arg list)

RETURNS

void

dmLogRegisterListener

void dmLogRegisterListener(FLogListener listener)

Registers a log listener. This listener receive logs even in release bundle.

PARAMETERS

FLogListener listener

dmLogUnregisterListener

void dmLogUnregisterListener( [type:FLogListener])

Unregisters a log listener.

PARAMETERS

[type:FLogListener] listener

dmLogSetLevel

void dmLogSetLevel( [type:dmLog::Severity])

set log system severity level.

PARAMETERS

[type:dmLog::Severity] severity

dmLog::RegisterLogListener

void dmLog::RegisterLogListener(FLogListener listener)

Registers a dmLog listener. This listener receive logs even in release bundle.

PARAMETERS

FLogListener listener

dmLog::UnregisterLogListener

void dmLog::UnregisterLogListener( [type:FLogListener])

Unregisters a dmLog listener.

PARAMETERS

[type:FLogListener] listener

dmLog::Setlevel

void dmLog::Setlevel( [type:dmLog::Severity])

set log system severity level.

PARAMETERS

[type:dmLog::Severity] severity

Types

dmLog:LogListener

dmLog listener function type. Provides all logs from dmLog* functions and print/pprint Lua functions. Used with dmLogRegisterListener() and dmLogUnregisterListener()


Enums

LogSeverity

Log severity

LOG_SEVERITY_DEBUG
LOG_SEVERITY_USER_DEBUG
LOG_SEVERITY_INFO
LOG_SEVERITY_WARNING
LOG_SEVERITY_ERROR
LOG_SEVERITY_FATAL

Macros

DLIB_LOG_DOMAIN

If DLIB_LOG_DOMAIN is defined the value of the defined is printed after severity. Otherwise DEFAULT will be printed.

EXAMPLES

#define DLIB_LOG_DOMAIN "MyOwnDomain"
#include <dmsdk/dlib/log.h>