libfreenect2  0.2
Classes | Functions
Logging utilities

Specify logging level and custom logging destination. More...

Classes

class  Logger
 Provide interfaces to receive log messages. More...
 

Functions

Logger * createConsoleLogger (Logger::Level level)
 Allocate a Logger instance that outputs log to standard input/output. More...
 
Logger * createConsoleLoggerWithDefaultLevel ()
 Default is Info, or overridden by environment variable LIBFREENECT2_LOGGER_LEVEL. More...
 
Logger * getGlobalLogger ()
 Get the pointer to the current logger. More...
 
void setGlobalLogger (Logger *logger)
 Set the logger for all log output in this library. More...
 

Detailed Description

Specify logging level and custom logging destination.

Function Documentation

Logger* libfreenect2::createConsoleLogger ( Logger::Level  level)

Allocate a Logger instance that outputs log to standard input/output.

Logger* libfreenect2::createConsoleLoggerWithDefaultLevel ( )

Default is Info, or overridden by environment variable LIBFREENECT2_LOGGER_LEVEL.

libfreenect2 will have an initial global logger created with createConsoleLoggerWithDefaultLevel(). You do not have to explicitly call this if the default is already what you want.

Logger* libfreenect2::getGlobalLogger ( )

Get the pointer to the current logger.

Returns
Pointer to the logger. This is purely informational. You should not free the pointer.
void libfreenect2::setGlobalLogger ( Logger logger)

Set the logger for all log output in this library.

Parameters
loggerPointer to your logger, or NULL to disable logging. The memory will be freed automatically. You should not free the pointer.