def log_change_report(self, old_value, new_value, include_details=False): from octoprint.util import map_boolean with self._check_mutex: self._logger.info("Connectivity changed from {} to {}".format( map_boolean(old_value, "online", "offline"), map_boolean(new_value, "online", "offline"))) if include_details: self.log_details()
def log_details(self): from octoprint.util import map_boolean self._logger.info("Connecting to {}:{} is {}".format( self._host, self._port, map_boolean(self._connection_working, "working", "not working"))) if self._name: self._logger.info("Resolving {} is {}".format( self._name, map_boolean(self._resolution_working, "working", "not working")))
def log_full_report(self): from octoprint.util import map_boolean with self._check_mutex: self._logger.info("Connectivity state is currently: {}".format( map_boolean(self.online, "online", "offline"))) self.log_details()