Enable logging
`logging.basicConfig` doesn't work when run via `uvicorn`. I now explicitly get the root logger and set its level to INFO, which means we now see logs on the terminal.
This commit is contained in:
parent
94e1619056
commit
3059683186
1 changed files with 4 additions and 2 deletions
|
|
@ -14,9 +14,11 @@ from .things.camera_stage_mapping import CameraStageMapper
|
|||
from .things.system_control import SystemControlThing
|
||||
from .things.settings_manager import SettingsManager
|
||||
from .serve_static_files import add_static_files
|
||||
import openflexure_microscope_server
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
root_logger = logging.getLogger()
|
||||
root_logger.setLevel(logging.INFO)
|
||||
root_logger.info("This is a message from OFM server via root_logger")
|
||||
logging.info("This is another message via logging.info")
|
||||
|
||||
thing_server = ThingServer()
|
||||
thing_server.add_thing(StreamingPiCamera2(), "/camera/")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue