From 2ae4034b97d45f0f4eff49b0cc3d02f896431211 Mon Sep 17 00:00:00 2001 From: Arksine Date: Fri, 31 Jul 2020 12:49:25 -0400 Subject: [PATCH] moonraker: Add some additional logging during init This logging may be useful in helping users troubleshoot problems stemming from Klippy based errors. Signed-off-by: Eric Callahan --- moonraker/moonraker.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/moonraker/moonraker.py b/moonraker/moonraker.py index 7b59ed6..ad82aad 100644 --- a/moonraker/moonraker.py +++ b/moonraker/moonraker.py @@ -241,6 +241,11 @@ class Server: if not isinstance(result, ServerError): self._load_config(result) self.server_configured = True + else: + logging.info( + "\nError receiving configuration. This indicates a potential\n" + "configuration issue in printer.cfg. Please check klippy.log\n" + "for more information") async def _request_ready(self): request = self.make_request( @@ -250,6 +255,11 @@ class Server: is_ready = result.get("is_ready", False) if is_ready: self._set_klippy_ready() + if not self.is_klippy_ready: + logging.info( + "\nKlippy not ready. This indicates a that Klippy may have\n" + "experienced an error during startup. Please check\n" + "klippy.log for more information") def _load_config(self, config): self.request_timeout = config.get(