Instrumental icon indicating copy to clipboard operation
Instrumental copied to clipboard

Recording changes in instrument's state via logging

Open jondoesntgit opened this issue 6 years ago • 1 comments

Hey guys,

I've developed my own library for controlling hardware over at https://github.com/jondoesntgit/hardware. One of the features that we're implementing in our library is this notion of "logging" any changes of instrument state to a file. When an instrument is loaded, all of its properties and settings are appended to a text file associated with that day's date, along with a timestamp. When an experiment is being performed, this can be helpful for keeping good records of what changed in what order.

Do you have plans of implementing this in your repository?

jondoesntgit avatar Jul 10 '18 00:07 jondoesntgit

Hi Jonathan,

No, I wouldn't say we have any specific plans to specialized logging of instrument state, though I certainly wouldn't rule it out.

Generally speaking, we do use python's built-in logging module with per-module loggers, and any changes made to the values of any Facets will get logged. At program startup, you can direct logging to a file if you like, as well as to stdout.

You might also be interested in Lant'z approach to logging.

natezb avatar Jul 11 '18 04:07 natezb