-
Notifications
You must be signed in to change notification settings - Fork 22
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
CLI arguments for 'start-re-manager' to set logging verbosity #135
Conversation
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 am only concerned about logging.basicConfig(level=max(logging.WARNING, self._log_level))
(left a comment), otherwise looks good.
@@ -1521,8 +1522,7 @@ def run(self): | |||
Overrides the `run()` function of the `multiprocessing.Process` class. Called | |||
by the `start` method. | |||
""" | |||
|
|||
logging.basicConfig(level=logging.WARNING) | |||
logging.basicConfig(level=max(logging.WARNING, self._log_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.
What is the intention here? E.g. if self._log_level
is INFO
(=20), the set level will be WARNING
(=30). The description says the default is INFO
.
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.
This would be logging level for other packages except bluesky_queueserver
for which logging is not set explicitly. Typically it is undesirable to get debug/info logging from all packages in any circumstances. So here I limit logging level to WARNING or higher.
Co-authored-by: Maksim Rakitin <mrakitin@users.noreply.github.com>
Co-authored-by: Maksim Rakitin <mrakitin@users.noreply.github.com>
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.
Looks good to me now. Thanks for accepting the suggestions, @dmgav!
The set of CLI parameters was added to
start-re-manager
that allow to modify verbosity of logging output. Currently logging can only be sent to stdout/stderr. By default, RE Manager will display log messages starting fromloglevel=INFO
. The log includes warnings, errors, brief messages with information about the state of the manager and worker processes and executed steps. This behavior may be modified by callingstart-re-manager
with the following mutually exclusive parameters:--verbose
prints all logging messages includingDEBUG
messages. In addition to short messages indicating the executed steps, the output will display contents of all received/send messages, submitted plans etc. Verbose output may be useful for debugging purposes, but may slow down the system if the plan queue, history or the lists of plans/devices become long.--quiet
prints only warning and error message. Output is insufficient to monitor plan execution.--silent
disables logging.Resolves the issue #130