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

Disabling logging breaks compilation #8

Open
lcavalli opened this issue Aug 2, 2022 · 1 comment
Open

Disabling logging breaks compilation #8

lcavalli opened this issue Aug 2, 2022 · 1 comment

Comments

@lcavalli
Copy link

lcavalli commented Aug 2, 2022

Hi,
disabling logging by undefining ULOG_ENABLED breaks compilation due to the replacement of functions with empty do loops.

image

Also, checking returned values may be a problem with empty loops:

ULOG_INIT();
ulogErr = ULOG_SUBSCRIBE(console_logger, ULOG_TRACE_LEVEL);
assert(ulogErr == ULOG_ERR_NONE);
@lcavalli
Copy link
Author

lcavalli commented Aug 2, 2022

Initialization and configuration are in few specific places and can be disabled by the caller.
Logging function are disabled in ulog if ULOG_EBALED is unset.

Proposed pull request to fix the issue: #10

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