moonraker: add --nologfile (-n) option to the command line

This allows moonraker to run without generating a log file.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine
2020-12-31 20:42:40 -05:00
parent 933622adda
commit 2f8a1567a8
3 changed files with 21 additions and 9 deletions

View File

@@ -131,7 +131,8 @@ class MoonrakerApp:
# Register handlers
logfile = config['system_args'].get('logfile')
self.register_static_file_handler("moonraker.log", logfile)
if 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)