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

I2C log level ignored #18085

Closed
oxymoron87 opened this issue Aug 7, 2019 · 0 comments · Fixed by #24344
Closed

I2C log level ignored #18085

oxymoron87 opened this issue Aug 7, 2019 · 0 comments · Fixed by #24344
Assignees

Comments

@oxymoron87
Copy link

Describe the bug
Can't turn off logging for i2c driver (i2c_nrfx_twi.c) even if the CONFIG_I2C_LOG_LEVEL_OFF is set (and CONFIG_I2C_LOG_LEVEL=0).

According to this note for LOG_MODULE_REGISTER
@note The module's state is defined, and the module is registered, only if LOG_LEVEL for the current source file is non-zero or it is not defined and CONFIG_LOG_DEFAULT_LEVEL is non-zero. In other cases, this macro has no effect.

and this lines from i2c_nrfx_twi.c
#define LOG_LEVEL CONFIG_I2C_LOG_LEVEL #include <logging/log.h> LOG_MODULE_REGISTER(i2c_nrfx_twi);

macro should not register this file and no logs should be printed.

Environment (please complete the following information):

  • OS: Linux
  • Commit SHA or Version used - zephyr-v1.14.0-2943-g8e9bf88d66
@oxymoron87 oxymoron87 added the bug The issue is a bug, or the PR is fixing a bug label Aug 7, 2019
@ioannisg ioannisg added this to the v1.14.1 milestone Aug 11, 2019
@ioannisg ioannisg added question and removed bug The issue is a bug, or the PR is fixing a bug labels Aug 13, 2019
@ioannisg ioannisg modified the milestones: v1.14.1, v1.14.2 Nov 12, 2019
@nashif nashif removed this from the v1.14.2 milestone Dec 12, 2019
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

Successfully merging a pull request may close this issue.

6 participants