Closed xoxys closed 2 years ago
As a matter of fact, we do see a few duplicate logs, only at the start of the process in flask mode. I wonder if something could be done (though it's very minor).
The first log entry WOPI Server starting in unsecure/embedded mode
is duplicated because Flask immediately restart the server, but that's related to the debug mode behavior of Flask and IMO not a logging issue.
The first log entry WOPI Server starting in unsecure/embedded mode is duplicated because Flask immediately restart the server, but that's related to the debug mode behavior of Flask and IMO not a logging issue.
Right, thanks for that - and indeed not really an issue for this PR.
@glpatcern Could we get a tag for this change?
@xoxys sure, I wanted to tag today after merging two more completed PRs.
Cool, thanks!
Background: https://github.com/Pylons/waitress/issues/151
For
waitress
it's required to add a log handler to the root logger (which is recommended in general) otherwisewaitress
will add its own handler. As a result, there exists a waitress handler and a flask handler which are both used for logging.Result with debug log level:
To fix it, this PR is removing the flask log handler and adding a proper handler to the root logger if waitress is used.
Result: