Make the logger toggleable.