Fix bugs in new logging routines.
Do not warn about free() calls as glibc calls it on every sprintf thus cluttering the log.