This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Not possible to disable the shell as a log backend in Zephyr (for nRF9160)

Hi,

We are using nRF Connect SDK 1.1 for nRF9160.

It is not possible to turn off the shell as a log backend in Zephyr. Is this a bug or a feature? Is there any way I can disable it?

How to reproduce:

1) I set the symbol CONFIG_SHELL_LOG_BACKEND=n in a .conf-file

2) When building I get the warning:

warning: SHELL_LOG_BACKEND (defined at subsys/shell/Kconfig:151) was assigned the value 'n' but got
the value 'y'. This symbol has no prompt, meaning assignments in configuration files have no effect
on it. It can only be set indirectly, via Kconfig defaults (e.g. in a Kconfig.defconfig file) or
through being 'select'ed or 'imply'd (note: try to avoid Kconfig 'select's except for trivial
promptless "helper" symbols without dependencies, as it ignores dependencies and forces symbols on).
You can check symbol information (including dependencies) in the 'menuconfig' interface (see the
Application Development Primer section of the manual), or in the Kconfig reference at
docs.zephyrproject.org/.../CONFIG_SHELL_LOG_BACKEND.html (which is
updated regularly from the master branch). See the 'Setting configuration values' section of the
Board Porting Guide as well. It covers Kconfig.defconfig files.

3) I read about the the config at https://docs.zephyrproject.org/2.1.0/reference/kconfig/CONFIG_SHELL_LOG_BACKEND.html. It confirms that the config cannot be set directly since it has no prompt.

BR / Björn

Parents
  • According to the Zephyr manual for that config option, it defaults to yes if CONFIG_LOG is true.

    Have you checked to see if the CONFIG_LOG is being set true by something else if you haven't already set CONFIG_LOG=n?

  • Hi,

    You misunderstand. Clarification:

    1) I have enabled logs thorugh CONFIG_LOG=y, and I want to have logs enabled.

    2) I DONT want to use the shell as a logger backend, I want to turn it off through the setting SHELL_LOG_BACKEND=n, but it does not seem to be possible according to the info I have given.

    3) I want to use the UART as a logger backend instead through CONFIG_LOG_BACKEND_UART=y.

    My question is: Why is it not possible to disable the shell as a logger backend? Is this a bug or by design? I also want to know if it possible to disable it some other way!

    BR / Björn

Reply
  • Hi,

    You misunderstand. Clarification:

    1) I have enabled logs thorugh CONFIG_LOG=y, and I want to have logs enabled.

    2) I DONT want to use the shell as a logger backend, I want to turn it off through the setting SHELL_LOG_BACKEND=n, but it does not seem to be possible according to the info I have given.

    3) I want to use the UART as a logger backend instead through CONFIG_LOG_BACKEND_UART=y.

    My question is: Why is it not possible to disable the shell as a logger backend? Is this a bug or by design? I also want to know if it possible to disable it some other way!

    BR / Björn

Children
Related