Skip to content

Improve BlueAPI logging to add plans registered and version of repositories in scratch area #1457

@oliwenmandiamond

Description

@oliwenmandiamond

When using BlueAPI, the typical logging you would see at startup is as follows:

2026-03-26 10:45:14,619     INFO numexpr.utils NumExpr defaulting to 16 threads.
2026-03-26 10:45:16,676     INFO uvicorn.error Started server process [1]
2026-03-26 10:45:16,691     INFO uvicorn.error Waiting for application startup.
2026-03-26 10:45:20,108     INFO Dodal Setting global path provider to <blueapi.utils.path_provider.StartDocumentPathProvider object at 0x7f5e6cdf02d0> (previously None)
2026-03-26 10:45:21,415     INFO blueapi.core.context Including devices from 'deviceManager' source dodal.beamlines.i09:devices
2026-03-26 10:45:21,610     INFO blueapi.utils.connect_devices 27 devices connected:
2026-03-26 10:45:21,610     INFO blueapi.utils.connect_devices 	dcm
	dual_energy_source
	dual_fast_shutter
	ew4000
	fsi1
	fsj1
...
2026-03-26 10:45:22,235     INFO blueapi.core.context Including plans from dodal.plans
2026-03-26 10:45:22,255     INFO blueapi.core.context Including plans from dodal.plan_stubs
2026-03-26 10:45:22,430     INFO blueapi.core.context Including plans from sm_bluesky.common.plans
2026-03-26 10:45:22,453     INFO blueapi.core.context Including plans from sm_bluesky.common.plan_stubs
2026-03-26 10:45:22,522     INFO blueapi.core.context Including plans from sm_bluesky.electron_analyser.plans
...
2026-03-26 10:45:22,556     INFO uvicorn.error Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) 

It would vastly improve the user experience when trying to deploy this to know exactly what version/branch of the repositories included are that BlueAPI picked up and to also know exactly what plans are included, same as the devices that were included.

e.g

INFO Using sm-bluesky version XXX (on branch YYY)
INFO Using dodal version XXX (on branch YYY)

and

INFO blueapi.core.context Including plans from dodal.plan_stubs
DEBUG Registered plan "move"
DEBUG Registered plan "move_relative"

Metadata

Metadata

Assignees

No one assigned

    Labels

    monitoringLogging, metrics, tracing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions