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

Verbosity level #4

Closed
jibsen opened this issue Jan 11, 2016 · 3 comments
Closed

Verbosity level #4

jibsen opened this issue Jan 11, 2016 · 3 comments

Comments

@jibsen
Copy link
Collaborator

jibsen commented Jan 11, 2016

A method for setting a verbosity level that controls the amount of information printed.

@nemequ
Copy link
Owner

nemequ commented Jan 11, 2016

Are you suggesting that certain levels limit what is in the assertion errors, or that I add something like

typedef enum {
  MUNIT_LOG_LEVEL_DEBUG,
  MUNIT_LOG_LEVEL_INFO,
  MUNIT_LOG_LEVEL_WARNING,
  MUNIT_LOG_LEVEL_CRITICAL,
  MUNIT_LOG_LEVEL_ERROR
} MunitLogLevel;

void munit_log(MunitLogLevel level, const char* fmt, ...);

I'm open to both ideas (though a bit unsure of how the assertion thing would work), just not sure what you're suggesting.

@jibsen
Copy link
Collaborator Author

jibsen commented Jan 11, 2016

I meant logging levels like in your example code there.

@nemequ
Copy link
Owner

nemequ commented Jan 11, 2016

An interesting related idea this could enable is something similar to what CTEST_OUTPUT_ON_FAILURE=1 does with ctest. We could write messages more severe than a certain level to a pipe and, if the test fails, splice the pipe to stderr.

nemequ added a commit that referenced this issue Jan 13, 2016
@nemequ nemequ closed this as completed Jan 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants