add switch for logger