rafaoc
rafaoc

Reputation: 596

how to Hide the output messages from libfreenect2?

For a project, I am working with libfreenect2 and because I am reading some commands from console I want to hide the messages* that libfreenect2 outputs when the kinect is acquiring data. How could I do that? *I mean all the messages about skipping data and so on

Upvotes: 0

Views: 284

Answers (2)

bct
bct

Reputation: 295

Another way, that also works if you don't have direct access to the API (e.g. when using the OpenNI2 driver), is to set the LIBFREENECT2_LOGGER_LEVEL environment variable. Possible values are:

None     
Error    
Warning      
Info     
Debug

Upvotes: 0

Simon Kraemer
Simon Kraemer

Reputation: 5670

Google is your friend: https://openkinect.github.io/libfreenect2/group__logging.html

void libfreenect2::setGlobalLogger  (   Logger *    logger  )   

Set the logger for all log output in this library.

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

So just use libfreenect2::setGlobalLogger(NULL);

Upvotes: 1

Related Questions