viveris / jtag-boundary-scanner

JTAG boundary scan debug & test tool.
GNU General Public License v3.0
124 stars 37 forks source link

Log level understanding #7

Open erazor-de opened 2 years ago

erazor-de commented 2 years ago

Hello, I might have some misunderstanding here, so please correct me.

In dbg_logs.c:44 you might have a typo meaning >= instead of >. ATM I have to write jtagcore_set_logs_level(core, MSG_DEBUG + 1); to get debug messages.

What irritates me is the ordering of the message levels. If I say MSG_WARNING I normally only want warnings and more critical things like errors. ATM I become the info messages (and only them). Also MSG_DEBUG is higher as MSG_ERROR. Wouldn't the order

enum MSGTYPE
{
 MSG_DEBUG = 0,
 MSG_INFO_0,
 MSG_INFO_1,
 MSG_WARNING,
 MSG_ERROR,
 MSG_NONE,
};

and the test if( jc->logs_level <= MSGTYPE ) make more sense?