DiamondLightSource / DiamondLightSource/mx-bluesky

Properly clean up all the handlers from the i24 logging configuration

Open
#609 0 comments 0 reactions 0 assignees View on GitHub
bug I24 serial
Dominant language
Python
Stars
4
Forks
5
Avg merge
1d 30m
Merged PRs (30d)
2

Description

With the log configuration changes in #572 the logs are now getting tidied up when closing the edm, avoiding the previously seen issue on i24 of duplicated log messages. However sometimes it looks like the filehandler for the user isn't properly closed and messages start duplicating again after an edm screen restart. The plan to tidy up logging should be changed to not only remove the handlers but properly close them.

```python
for handler in logger.handlers:
handler.close()
logger.handlers.clear()
```

## Acceptance Criteria
(This needs a test on the beamline)
- There are no more repeated messages anywhere after restarting edm when testing on i24

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.