コード例 #1
0
ファイル: connectivity.py プロジェクト: usernamePGQ/OctoPrint
    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()
コード例 #2
0
ファイル: connectivity.py プロジェクト: usernamePGQ/OctoPrint
 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")))
コード例 #3
0
ファイル: connectivity.py プロジェクト: tinkercnc/OctoPrint
    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()