-
Notifications
You must be signed in to change notification settings - Fork 52
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
[ESRF Specific files] - Cleanup, deletion and linting of ESRF specific files #1123
base: develop
Are you sure you want to change the base?
Conversation
if USER_CLICKED_EVENT and not USER_CLICKED_EVENT.ready(): | ||
logging.getLogger("HWR").debug("DEBUG: USER_CLICKED_EVENT: false") | ||
|
||
# Clear ready flag incase it was stuck |
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.
# Clear ready flag incase it was stuck | |
# Clear ready flag in case it was stuck |
if x < 0 or y < 0: | ||
for i in range(1, 18): | ||
# logging.info("loop not found - moving back %d" % i) | ||
logging.getLogger("HWR").info("loop not found - moving back %d" % i) |
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.
logging.getLogger("HWR").info("loop not found - moving back %d" % i) | |
logging.getLogger("HWR").info("loop not found - moving back %d", i) |
move_motors(SAVED_INITIAL_POSITIONS) | ||
raise | ||
|
||
# logging.info("X=%s,Y=%s", X, Y) | ||
# logging.getLogger("HWR").info("X=%s,Y=%s", X, Y) |
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.
I suggest removing this line or changing it to debug level log:
logging.getLogger("HWR").debug("X=%s,Y=%s", X, Y)
# logging.getLogger("HWR").debug(f"Click at {x}, {y}") | ||
except Exception: | ||
logging.exception("Exception while centring") | ||
logging.getLogger("HWR").exception("Exception while centring") | ||
move_motors(SAVED_INITIAL_POSITIONS) | ||
READY_FOR_NEXT_POINT.set() | ||
raise RuntimeError("Exception while centring") | ||
|
||
# logging.info("X=%s,Y=%s", X, Y) | ||
# logging.getLogger("HWR").debug("X=%s,Y=%s", X, Y) |
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.
I suggest turn the commented out debug log lines to actual code.
In principle, a verbose debug logging is not a problem. Debug logging can (should) be disabled when running in production.
Cleanup, deletion and linting of ESRF specific files: