-
Notifications
You must be signed in to change notification settings - Fork 200
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
vdsm-tool: move logs from stdout print to logging #258
Labels
enhancement
Enhancing the system by adding new feature or improving performance or reliability
logs
Enhancement or fixes to logs
Comments
aesteve-rh
added
enhancement
Enhancing the system by adding new feature or improving performance or reliability
logs
Enhancement or fixes to logs
labels
Jun 20, 2022
aesteve-rh
added a commit
to aesteve-rh/vdsm
that referenced
this issue
Sep 1, 2022
Use the global logger stored in vdsm.tool.LOGGER_NAME from all vdsm-tool sub-modules. All logs will use standard logging with consistent formatting. Fixes: oVirt#258 Signed-off-by: Albert Esteve <[email protected]>
aesteve-rh
added a commit
to aesteve-rh/vdsm
that referenced
this issue
Sep 1, 2022
Use the global logger stored in vdsm.tool.LOGGER_NAME from all vdsm-tool sub-modules. All logs will use standard logging with consistent formatting. Fixes: oVirt#258 Signed-off-by: Albert Esteve <[email protected]>
aesteve-rh
added a commit
to aesteve-rh/vdsm
that referenced
this issue
Sep 1, 2022
Use the global logger stored in vdsm.tool.LOGGER_NAME from all vdsm-tool sub-modules. All logs will use standard logging with consistent formatting. Fixes: oVirt#258 Signed-off-by: Albert Esteve <[email protected]>
aesteve-rh
added a commit
to aesteve-rh/vdsm
that referenced
this issue
Oct 17, 2022
Use the global logger stored in vdsm.tool.LOGGER_NAME from all vdsm-tool sub-modules. All logs will use standard logging with consistent formatting. Fixes: oVirt#258 Signed-off-by: Albert Esteve <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
Enhancing the system by adding new feature or improving performance or reliability
logs
Enhancement or fixes to logs
Currently,
vdsm-tool
logs messages directly to the stdout using the sys module. However, this solution is very limiting:vdsm-tool
acts as a wrapper for another vdsm module, any internal logging the vdsm module might do must be deferred to thevdsm-tool
. Alternatively, with logging we can pass the object as a parameter to allow other modules to log messages directly to thevdsm-tool
output, with consistent formatting.Proposal
Use logging, instantiate it in the
__init__
module and set up a format. From there we can import it in all submodules and use it instead ofsys.stdout
, with the proper severity level, and give it as parameter in wrapper modules.The text was updated successfully, but these errors were encountered: