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 <arksine.code@gmail.com>
This commit is contained in:
Arksine 2020-12-30 07:53:48 -05:00
parent 223c125106
commit 0a7080741c
1 changed files with 3 additions and 0 deletions

View File

@ -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):