def _update_env(self): logger.reset_level() try: if not EXEC_PARAMS.forced_debug_mode: if self.core.debug: logger.set_debug_mode() logger.debug('Debug mode is enabled in user settings.') elif self.core.verbose: logger.set_verbose_mode() set_file_logging(self.core.filelogging) except Exception as env_update_err: logger.error('Error updating env variable per user config. | {}'.format(env_update_err))
def _update_env(self): # update the debug level based on user config mlogger.reset_level() try: # first check to see if command is not in forced debug mode if not EXEC_PARAMS.debug_mode: if self.core.debug: mlogger.set_debug_mode() mlogger.debug('Debug mode is enabled in user settings.') elif self.core.verbose: mlogger.set_verbose_mode() logger.set_file_logging(self.core.filelogging) except Exception as env_update_err: mlogger.debug('Error updating env variable per user config. | %s', env_update_err)