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

Logger Module Config Question SDK12

I want to enable the Logger Module to have the high default severity of Error and then be able to enable lower level severities on an individual module for debugging. Is this possible with the current API?

Parents
  • Hi again

    Apparently the idea was to be able to limit the logs globally, without having to change every module, rather than being able to give one module a lower log level than the default.

    As he pointed out you could change the nrf_log_internal.h file easily to work the way you propose, by changing the && to || inside the various NRF_LOG_INTERNAL_.... macros in nrf_log_internal.h (between lines 99 to 164).

  • Torbjorn,

    Thanks for taking the time to look into this and provide me an answer! As your collegue pointed out I already changed the macros in the file from && to || and changed

    #ifndef NRF_LOG_LEVEL
        #define NRF_LOG_LEVEL NRF_LOG_DEFAULT_LEVEL
    #endif
    

    to

    #ifndef NRF_LOG_LEVEL
        #define NRF_LOG_LEVEL 0
    #endif
    

    As usual the Nordic support team is great!

    Cheers, Darren

Reply Children
No Data
Related