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 dmLogError(const char* format, ... args) log with "error" severity
void dmLogFatal(const char* format, ... args) log with "fatal" severity
LogSeverity dmLogGetLevel() get log system severity level.
void dmLogInfo(const char* format, ... args) log with "info" severity
void dmLogRegisterListener(FLogListener listener) register a log listener.
void dmLogSetLevel( [type:LogSeverity]) set log system severity level.
void dmLogUnregisterListener( [type:FLogListener]) unregister a log listener.
void dmLogUserDebug(const char* format, ... args) log with "user" severity
void dmLogWarning(const char* format, ... args) log with "warning" severity
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

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

dmLogGetLevel

LogSeverity dmLogGetLevel()

Get log system severity level.

PARAMETERS

RETURNS

LogSeverity severity

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

dmLogRegisterListener

void dmLogRegisterListener(FLogListener listener)

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

PARAMETERS

FLogListener listener

dmLogSetLevel

void dmLogSetLevel( [type:LogSeverity])

Set log system severity level.

PARAMETERS

[type:LogSeverity] severity

dmLogUnregisterListener

void dmLogUnregisterListener( [type:FLogListener])

Unregisters a log listener.

PARAMETERS

[type:FLogListener] listener

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

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

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>