Fix logging enable/disable conditional check.