0

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

rafaoc
  • 586
  • 7
  • 21

2 Answers2

1

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);

Simon Kraemer
  • 5,700
  • 1
  • 19
  • 49
0

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
bct
  • 285
  • 2
  • 11