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

Enable debug logging over serial

I'm trying to get the AT commands sent in the asset_tracker example written out together with the other printk statements. I have tried adding this to the prj.conf:

CONFIG_LOG=y
CONFIG_SERIAL=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_LTE_LINK_CONTROL_LOG_LEVEL=4

I have also tried hardcoding '4' into the LOG_MODULE_REGISTER in lte_lc.c. I know others has this working, so is there something obvious I'm missing?

Parents
  • Hi,

     

    It looks like the "master" branch is a bit under-the-weather. I cannot get the logging to work either, and I'll let the NCS developers know about this.

    Kind regards,

    Håkon

  • Hi!

    I just tried the same thing with the mqtt example and tried to add CONFIG_MQTT_LOG_LEVEL=4 unfortunately without success.

    Any updates on that issue?

    I tried to add the line to proj.conf but this lead to the following:

    warning: MQTT_LOG_LEVEL (defined at subsys\net\Kconfig.template.log_config.net:50) was assigned the
    value '4' but got the value '0'. 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_MQTT_LOG_LEVEL.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.

    So I added something like 

    config MQTT_LOG_LEVEL
        default 4

    to the Kconfig, which removed the error but does not have any effect on logging output.

  • The logging is still not working properly. I had to undef and redefine the log as printk as a temporary (and quite dirty) workaround.

     

    Best regards,

    Håkon

Reply Children
No Data
Related