Skip to content
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

Update PyRadiomics Logging #220

Merged
merged 3 commits into from
Mar 20, 2017
Merged

Conversation

JoostJM
Copy link
Collaborator

@JoostJM JoostJM commented Mar 14, 2017

Update logging, with mainly added debug messages on various functions throughout the toolbox.

Additionally, change how logging is set up in the various scripts used to run PyRadiomics. Instead of using a root logger, keep radiomics logger as 'root' logger, with script/batch specific log messages in the radiomics.script and radiomics.batch logger. This excludes the PyKwalify debug messages from the PyRadiomics log when level is set to DEBUG.

@JoostJM JoostJM force-pushed the update-logging branch 2 times, most recently from a1963d1 to 17cb20a Compare March 14, 2017 16:53
@JoostJM
Copy link
Collaborator Author

JoostJM commented Mar 14, 2017

@Radiomics/developers. As discussed in the last hangout, I changed the progress reporting in PyRadiomics to make use of the logging package where possible. This therefore also removes the verbose setting. The only output not directly handled by the logging is the progress bar in GLRLM and GLCM. However, the output of the progress bar is also to stderr, and it is only enabled when python calculation is enabled and the logging level of the handler (to stderr) has level INFO or DEBUG.

Update logging, with mainly added debug messages on various functions throughout the toolbox.

Additionally, change how logging is set up in the various scripts used to run PyRadiomics. Instead of using a root logger, keep 'radiomics' logger as 'root' logger, with script/batch specific log messages in the 'radiomics.script' and 'radiomics.batch' logger. This excludes the PyKwalify debug messages from the PyRadiomics log when level is set to DEBUG.
Restructure progress reporting in PyRadiomics to make use of logging package. Add a function `setVerbosity` to control verbosity level of the toolbox (level is specified as a logging level).
Replace calls to the `print` function by calls to `logger.info`. This also removes the need for the `verbose` keyword in the settings. When PyRadiomics is used in interactive python, a more verbose output can be obtained via the new `setVerbosity` function, defined at the module level. From the commandline, add an new optional argument (`--verbosity / -v`) to control verbosity (default level: WARNING, and when the argument is added without a value, level is set to INFO.
JoostJM referenced this pull request in blezek/pyradiomics Mar 20, 2017
@JoostJM JoostJM merged commit 0a223d8 into AIM-Harvard:master Mar 20, 2017
@JoostJM JoostJM deleted the update-logging branch March 21, 2017 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant