Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log level understanding #7

Open
erazor-de opened this issue Jan 28, 2022 · 0 comments
Open

Log level understanding #7

erazor-de opened this issue Jan 28, 2022 · 0 comments

Comments

@erazor-de
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant