NSLS-II / nslsii

NSLS-II related devices
BSD 3-Clause "New" or "Revised" License
11 stars 23 forks source link

Added templating to configure_olog #15

Closed jrmlhermitte closed 6 years ago

jrmlhermitte commented 6 years ago

Some beamlines use templating for olog, example: https://github.com/NSLS-II-CMS/profile_collection/blob/master/startup/45-olog.py#L90

@danielballan

danielballan commented 6 years ago

I provided a hook for CMS and CHX to pass in their logbook_cb_factory directly, which I slightly prefer because it minimizes the interface between these two components and allows for other possible customizations, all wrapped into logbook_cb_factory.

jrmlhermitte commented 6 years ago

so configure_olog(..., logboo_cb_factory=partial(logbook_cb_factory(**kwargs))) correct?

danielballan commented 6 years ago

Yes, that should be passed to configure_olog's callback argument.

danielballan commented 6 years ago

So many layers in Olog!! hahah

jrmlhermitte commented 6 years ago

Yeah partial not necessary. I overthought this one lol