python-progressbar: Logging module ignored when progressbar not used
#!/usr/bin/env python3
import progressbar
import logging
progressbar.streams.wrap_stderr()
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)
logger.info('test')
logger.info('test')
logger.info('test')
# count = 50000
# with progressbar.ProgressBar(max_value=count) as bar:
# for i in range(count):
# #logger.info('test')
# bar.update(i)
ref #129
If you do not use the progressbar module, all logger traces are ignored when used with progressbar.streams.wrap_stderr()
Using 0.32.0
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (10 by maintainers)
Commits related to this issue
- Merge tag 'v3.33.1' into develop fixed output redirection for the python logging. fixes #134, again v3.33.1 — committed to wolph/python-progressbar by wolph 7 years ago
Manually flushing is always an option, so you could add a “flush” filter or handler to your logger:
I’m hoping to get a new release out today featuring a semaphore to fix the issue.