fixup logging so all modes are logged

use a switch-case instead of if to get warnings if we miss a case.
resolves #36