ChannelLogger: Fix Python 2 compatibility.