[MNG-3194] Fixing logging problems, but error diagnosis is still missing from CLI version of things...this should probably be replaced and/or restored. I'll commit unit tests for 3194 next.