diff --git a/fiftyone/server/main.py b/fiftyone/server/main.py index cb4007bda5..13bd357d5e 100644 --- a/fiftyone/server/main.py +++ b/fiftyone/server/main.py @@ -5,6 +5,7 @@ | `voxel51.com `_ | """ + import argparse import os @@ -13,9 +14,6 @@ from hypercorn.config import Config import logging -if os.environ.get("FIFTYONE_ENABLE_DEBUG_LOGGING", False): - logging.getLogger("asyncio").setLevel(logging.DEBUG) - if os.environ.get("FIFTYONE_DISABLE_SERVICES", False): del os.environ["FIFTYONE_DISABLE_SERVICES"] @@ -27,6 +25,10 @@ from fiftyone.server.app import app from fiftyone.server.events import set_port +DEBUG_LOGGING = fo.config.logging_level == "DEBUG" + +if DEBUG_LOGGING: + logging.getLogger("asyncio").setLevel(logging.DEBUG) if __name__ == "__main__": parser = argparse.ArgumentParser() @@ -45,4 +47,4 @@ if args.clean_start: fo.delete_datasets("*") - asyncio.run(serve(app, config), debug=foc.DEV_INSTALL) + asyncio.run(serve(app, config), debug=DEBUG_LOGGING)