popmon icon indicating copy to clipboard operation
popmon copied to clipboard

Change verbosity level

Open sbrugman opened this issue 3 years ago • 4 comments

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.

sbrugman avatar Oct 21 '21 14:10 sbrugman

Hey, i would like to start working on this issue. Can you please guide me?

rishabsinghh avatar Jun 12 '23 19:06 rishabsinghh

@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

sbrugman avatar Jun 13 '23 12:06 sbrugman

Hey @sbrugman . This helps, i will ask you incase of any queries, thanks!

rishabsinghh avatar Jun 13 '23 17:06 rishabsinghh

Hey @sbrugman . Few Thoughts! Please correct me if i am going in the wrong direction

  1. 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!

image

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?

rishabsinghh avatar Jun 23 '23 19:06 rishabsinghh