There were two specific problems with the logging macros:
1) the existing varargs usage didn't allow for format string checking,
which is bad, since it could make logging segfault if the arguments
don't match the format string
2) it didn't allow logging usage without wrapping {}, ie this didn't work:
if (foo)
nm_log_dbg (...)
blah blah
Fix all that by using the varargs stuff correctly.
Previously the input would simply be printed, but if you're not
changing either the level or domains (ie sending "") then the
unchanged logging domains wouldn't be printed, only "".
By default most distros won't log debug messages to syslog; but we
want them logged when the user explicitly requests them via the logging
API and config options in NM. Half the point of doing more logging
was to make it easier for users to get logs out of NM, and having
to edit syslog configuration makes it all pointless.
Some stuff we build (the DHCP manager) gets built independently
so that we can use it for unit tests. For that, we need to build
the logging bits separately too, since the independent DHCP
library can't use them if they are embedded in NM.