Use a StringBuffer instead of synchronization when generating log
messages. The only exception is if the stacktrace of a Throwable also
needs to be written. Then we have to ensure that our message goes with
the stacktrace so we need synchronization there. But this should not be
a drawback since the Throwable.printStackTrace() itself synchronizes on
the PrintStream.