disabling logger when not needed