moonraker: Improve connection error logging
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
0abfc76871
commit
a4638f6c21
|
@ -258,10 +258,11 @@ class Server:
|
||||||
self.moonraker_available = True
|
self.moonraker_available = True
|
||||||
else:
|
else:
|
||||||
logging.info(
|
logging.info(
|
||||||
"\nCheck for moonraker availability has failed. This "
|
"%s\nUnable to detect Moonraker compatibility in Klipper.\n "
|
||||||
"indicates that the [moonraker] section has not been added to "
|
"Repeated failures may indicate that the [moonraker] section\n "
|
||||||
"printer.cfg, or that Klippy has experienced an error "
|
"has not been added to printer.cfg. This may also indicate\n"
|
||||||
"parsing its configuraton. Check klippy.log for more info.")
|
"that Klippy has experienced an error during startup. Check\n"
|
||||||
|
"klippy.log for more info." % (str(result)))
|
||||||
|
|
||||||
async def _check_ready(self):
|
async def _check_ready(self):
|
||||||
request = self.make_request("info", "GET", {})
|
request = self.make_request("info", "GET", {})
|
||||||
|
@ -272,12 +273,12 @@ class Server:
|
||||||
self._set_klippy_ready()
|
self._set_klippy_ready()
|
||||||
else:
|
else:
|
||||||
msg = result.get("message", "Klippy Not Ready")
|
msg = result.get("message", "Klippy Not Ready")
|
||||||
logging.info(msg)
|
logging.info("\n" + msg)
|
||||||
else:
|
else:
|
||||||
logging.info(
|
logging.info(
|
||||||
"Klippy Info request error. This indicates a that Klippy "
|
"%s\nKlippy info request error. This indicates a that Klippy\n"
|
||||||
"may have experienced an error during startup. Please check "
|
"may have experienced an error during startup. Please check\n "
|
||||||
"klippy.log for more information")
|
"klippy.log for more information" % (str(result)))
|
||||||
|
|
||||||
def _handle_klippy_response(self, request_id, response):
|
def _handle_klippy_response(self, request_id, response):
|
||||||
req = self.pending_requests.pop(request_id, None)
|
req = self.pending_requests.pop(request_id, None)
|
||||||
|
|
Loading…
Reference in New Issue