popmon
popmon copied to clipboard
Change verbosity level
popmon
by default provides logging and progress bar (tqdm) output while computing the report. There currently is no user-friendly way to change the verbosity level altogether.
Hey, i would like to start working on this issue. Can you please guide me?
@rishabsinghh Welcome!
The way logging is performed in popmon
is that each Module
has a logger
property.
Modules will call self.logger.info
, self.logger.warn
etc.
See for example:
- https://github.com/ing-bank/popmon/blob/master/popmon/alerting/alerts_summary.py#L86
- https://github.com/ing-bank/popmon/blob/master/popmon/alerting/compute_tl_bounds.py#L377
- https://github.com/ing-bank/popmon/blob/master/popmon/analysis/comparison/hist_comparer.py#L256
- https://github.com/ing-bank/popmon/blob/master/popmon/hist/hist_splitter.py#L106
- https://github.com/ing-bank/popmon/blob/master/popmon/stitching/hist_stitcher.py#L71
- https://github.com/ing-bank/popmon/blob/master/popmon/visualization/histogram_section.py#L117
In addition, the tqdm
progress bar is used, e.g.
- https://github.com/ing-bank/popmon/blob/master/popmon/visualization/alert_section_generator.py#L119
This issue was intended to re-evaluate the usefulness of each of the logging statements and their level (is it debug information? Then it should be self.logger.debug
).
Then, the user should be able to control the level of output to receive (either via the logging
config, or via popmon
's Settings)
Does this help you forward?
ps. also open to use alive-progress instead of tqdm
Hey @sbrugman . This helps, i will ask you incase of any queries, thanks!
Hey @sbrugman . Few Thoughts! Please correct me if i am going in the wrong direction
- Verbosity can be defined as an input variables with numbers indicating the level of logging user needs. We may define this at the time we generate report settings.
Some thing like this!
And for progress bar similarly we can have another input variable called "show_progress_bar" which would be boolean. True and False.
Does this make sense?