Fixed bug in logging configuration.

See commits for comments.