From 0a7080741c0a92e5ad91eec0520c9671f4615d0a Mon Sep 17 00:00:00 2001 From: Arksine Date: Wed, 30 Dec 2020 07:53:48 -0500 Subject: [PATCH] app: Register a default file path for klippy.log This will make klippy.log available in the event that Klippy has not successfully connected, assuming the log is available at the default location. Signed-off-by: Eric Callahan --- moonraker/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/moonraker/app.py b/moonraker/app.py index d3e751e..be5eb88 100644 --- a/moonraker/app.py +++ b/moonraker/app.py @@ -24,6 +24,7 @@ RESERVED_ENDPOINTS = [ ] EXCLUDED_ARGS = ["_", "token", "connection_id"] +DEFAULT_KLIPPY_LOG_PATH = "/tmp/klippy.log" # Status objects require special parsing def _status_parser(request_handler): @@ -131,6 +132,8 @@ class MoonrakerApp: # Register handlers logfile = config['system_args'].get('logfile') self.register_static_file_handler("moonraker.log", logfile) + self.register_static_file_handler( + "klippy.log", DEFAULT_KLIPPY_LOG_PATH) self.auth.register_handlers(self) def listen(self, host, port):