Today we have in OpenOCD
enum log_levels {
         LOG_LVL_SILENT = -3,
         LOG_LVL_OUTPUT = -2,
         LOG_LVL_USER = -1,
         LOG_LVL_ERROR = 0,
         LOG_LVL_WARNING = 1,
         LOG_LVL_INFO = 2,
         LOG_LVL_DEBUG = 3,
         LOG_LVL_DEBUG_IO = 4,
};
[...]
My proposal is, as a first step, to simply add a new entry in
"log_level": LOG_LVL_DEBUG_USB. Then convert current _DEBUG_USB_COMMS_
code under this new category.

I think that should be doable. But before I delve into the details, I have 
another related question:

After converting --enable-verbose-usb-comms to this method, I wanted to do the 
same with --enable-malloc-logging / _DEBUG_FREE_SPACE_ .

Should I add a new LOG_LVL_DEBUG_MALLOC too? Like this:

[...]
LOG_LVL_DEBUG = 3,
LOG_LVL_DEBUG_IO = 4,
LOG_LVL_DEBUG_USB= 5,    // new
LOG_LVL_DEBUG_MALLOC= 6, // new

Best regards,
  rdiez


Reply via email to