Various fixes and improvements to the new Logging API.

Also makes sure that ConsoleAppender can be turned on again if the situation requires it.