I thought it might be of interest to note that in the Keil compiler (which for me is code size limited because I do not have $$$ or Euros at my disposal) generates a code size of 38636 bytes. If I set NRF_LOG to 0 in config_sdk.h, the compiled code size is 18528. Now I don't need the Keil compiler because I can use SES but I would like to assure that my project builds and runs in Keil. Unfortunately, since I allow MTU size changes I need more room for SoftDevice and to find that size I need to print out some messages to see it. Then I can configure Keil memory layout correctly.
So the question I have is why does the logging take up so much space? Is it the logger software itself or is it the number of log statements I have in my code? In other words, if I were to cut down the number of log statements to just the precious few that I need, would that make a dramatic decrease in size? Or would I be wasting my time just because supporting the any logging takes up a lot of space?
If it is the logging in my code that is responsible for the size, then perhaps there is a high level log option I could use to filter out DEBUG and INFO levels and that would get removed from the code. I could print out what I needed, perhaps, using level 'ERROR'.
I looked at the map file and it doesn't help too much in that regard as the code sizes are given by modules and the logging material is mixed in both my code and Nordic support code.
I answered my own question. One can set the log level in config_sdk.h and my code uses all DEBUG. Setting the log level to INFO has a size of 20K whereas at level DEBUG the size is 38K.