Updated logger.

There was a fairly bad bug in the logger that used the single threaded
code for the multi-threaded code.
Fixing up logger.