This is an automated email from the ASF dual-hosted git repository. gstein pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/steve.git
commit 5079a262a5fa8f4409b86d34ab40be353fc120b9 Author: Greg Stein <[email protected]> AuthorDate: Sun Sep 28 13:11:36 2025 -0500 Various improvements when running the server. * tweak some logging for less DEBUG in a few modules * switch to regular OAuth2 rather than OIDC * allow for TLS operation, if a cert/key is configured * adjust .runx() for above --- v3/server/main.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/v3/server/main.py b/v3/server/main.py index 1c1ce29..5c2369c 100755 --- a/v3/server/main.py +++ b/v3/server/main.py @@ -34,6 +34,17 @@ def main(): datefmt=DATE_FORMAT, ) + # Switch some loggers to INFO, rather than DEBUG + logging.getLogger('selector_events').setLevel(logging.INFO) + logging.getLogger('hpack').setLevel(logging.INFO) + logging.getLogger('sslproto').setLevel(logging.INFO) + + ### is this really needed right now? + # Avoid OIDC + import asfquart.generics + asfquart.generics.OAUTH_URL_INIT = "https://oauth.apache.org/auth?state=%s&redirect_uri=%s" + asfquart.generics.OAUTH_URL_CALLBACK = "https://oauth.apache.org/token?code=%s" + app = asfquart.construct('steve') # Now that we have an APP, import modules that will add page @@ -41,8 +52,16 @@ def main(): import pages # pylint: disable=unused-import import api # pylint: disable=unused-import + kwargs = { } + if app.cfg.server.certfile: + kwargs['certfile'] = THIS_DIR / app.cfg.server.certfile + kwargs['keyfile'] = THIS_DIR / app.cfg.server.keyfile + # Spool up the app! - app.runx(port=app.cfg.port) + app.runx(port=app.cfg.server.port, **kwargs) + + #print('LOGGERS:', sorted(_LOGGER.manager.loggerDict.keys())) + #print(_LOGGER.manager.loggerDict['sslproto']) if __name__ == '__main__':
