Make sure the logger module encodes strings in a way that works with
Python 2 and 3