Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Server initialization fails silently when logging.yaml is empty #1560
What were you doing?
Restarting the octoprint server with an empty logging.yaml (after removing event debug level). The service fails to start and nothing is written to octoprint.log.
Minimal commands to reproduce:
What did you expect to happen?
Service to restart correctly or log the appropriate error.
What happened instead?
The service fails to start and nothing is written to octoprint.log.
Branch & Commit or Version of OctoPrint
1.2.16 (master branch)
Printer model & used firmware incl. version
Browser and Version of Browser, Operating System running Browser
Link to octoprint.log
octoprint.log is empty
Link to contents of terminal tab or serial.log
Screenshot(s) showing the problem:
I have read the FAQ.
I'm happy to submit a PR to fix this - my quick testing shows that just catching the exception coming from logging.config.dictConfig in _setup_logging is enough to allow the server to start as usual. Unfortunately, the logger isn't started at that point, so I can't write any information about the failure to parse logging.yaml to octoprint.log.
@brianholley happy for any pr against devel, will take care to backport to maintenance. Obviously I never tested with an empty logging.yaml, only with a filled one and without one m)
(Short heads up, merging might take a couple of days, I'm currently not in working order)