-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make common MX bluesky logging #580
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #580 +/- ##
==========================================
+ Coverage 78.21% 78.24% +0.03%
==========================================
Files 92 93 +1
Lines 6797 6809 +12
==========================================
+ Hits 5316 5328 +12
Misses 1481 1481
|
Something in the developer docs about how the logs work and how to set them up would definitely be helpful - thinking mainly in terms of having a reference for the future. |
tag_filter.run_uid = uid | ||
|
||
|
||
def do_default_logging_setup(file_name: str, graylog_port: int, dev_mode: bool = False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noemifrisina has requested an option to toggle whether or not this function runs integrate_bluesky_and_ophyd_logging
, so I'll add that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Whats the usecase for dropping all the ophyd/bluesky logs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what @noemifrisina was saying (but correct me if I'm wrong), it's useful to see the sys.sterr logs on i24, and it gets cluttered with ophyd+bluesky+ophyd-async logs. Also, she was seeing an issue where ophyd debug logs were appearing even when it wasn't set to debug level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, mainly to have the choice of getting everything or just setting up the ones we're interested in (in i24 case we don't need the debug logs from ophyd, just ophyd_async).
Can we replace some of the code in |
Yes, I was thinking this could be done in separate PR (maybe #572). Happy to do it in here instead though |
We could do this here, or I can pull the changes from this branch into #572 and do that bit in there. I'm fine either way, if we're going to have that in this PR I'll just close the other one. |
Fixes #574
I will either put the below instructions in the docs or as a helper function:
A beamline should use these logs by:
LOGGER = logging.getLogger("Hyperion")
do_default_logging_setup
eg: