Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Enhance NRF LOG to include line number in prefix

Hello,

I want to modify the NRF logging module to include the line number where the log was originated.

In the past I created a wrapper macro that called NRF_LOG_INFO twice, once with the desired prefix and one with the actual string I wanted to print. I also had to remove the new line characters from the logging module so that the two calls were printed in the same line. I don't want to do this wrapper stuff anymore and would like to modify the logging module instead.

What would be the best way to do this? I'm currently using SDK 15.2.

Parents Reply Children
Related