Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server initialization fails silently when logging.yaml is empty #1560

Closed
brianholley opened this issue Oct 25, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@brianholley
Copy link

commented Oct 25, 2016

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:
mv ~/.octoprint/logging.yaml ~/.octoprint logging.yaml.bak
touch ~/.octoprint/logging.yaml
sudo service octoprint restart

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

N/A

Browser and Version of Browser, Operating System running Browser

N/A

Link to octoprint.log

octoprint.log is empty
Console output when running octoprint process manually: https://gist.github.com/brianholley/e3d891d9278a2bc294baae9a14d95085

Link to contents of terminal tab or serial.log

N/A

Link to contents of Javascript console in the browser

N/A

Screenshot(s) showing the problem:

N/A

I have read the FAQ.

@brianholley

This comment has been minimized.

Copy link
Author

commented Oct 25, 2016

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.

@foosel

This comment has been minimized.

Copy link
Owner

commented Oct 25, 2016

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

@foosel

This comment has been minimized.

Copy link
Owner

commented Feb 22, 2017

Fixed on maintenance (where it actually was already fixed in a way, made it more resilient though), will merge to devel ASAP, will also be part of 1.3.2

@foosel foosel added this to the 1.3.2 milestone Feb 22, 2017

@foosel foosel closed this in 79af90d Mar 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.