def test_set_global_verbosity_level(self, capture): lgr = logger.init(base_level=logging.INFO) fd._set_global_verbosity_level(is_verbose_output=False) lgr.debug('TEST_LOGGER_OUTPUT') capture.check() lgr.info('TEST_LOGGER_OUTPUT') capture.check(('user', 'INFO', 'TEST_LOGGER_OUTPUT')) fd._set_global_verbosity_level(is_verbose_output=True) lgr.debug('TEST_LOGGER_OUTPUT') capture.check(('user', 'INFO', 'TEST_LOGGER_OUTPUT'), ('user', 'DEBUG', 'TEST_LOGGER_OUTPUT'))
def test_set_global_verbosity_level(self, capture): lgr = logger.init(base_level=logging.INFO) fd._set_global_verbosity_level(is_verbose_output=False) lgr.debug('TEST_LOGGER_OUTPUT') capture.check() lgr.info('TEST_LOGGER_OUTPUT') capture.check(('user', 'INFO', 'TEST_LOGGER_OUTPUT')) fd._set_global_verbosity_level(is_verbose_output=True) lgr.debug('TEST_LOGGER_OUTPUT') capture.check( ('user', 'INFO', 'TEST_LOGGER_OUTPUT'), ('user', 'DEBUG', 'TEST_LOGGER_OUTPUT'))
-g --gap=<int> Number of seconds between messages (can be less than 1) -m --messages=<int> Number of messages to generate (if omitted will assume infinity (good for daemonization)) -b --batch=<int> Number of messages to stack before shipping -v --verbose a LOT of output --version Display current version of feedr and exit """ from __future__ import absolute_import from docopt import docopt import feedr.logger as logger from feedr.feedr import _set_global_verbosity_level from feedr.feedr import generator from feedr.feedr import list_fake_types, list_transports, list_formatters lgr = logger.init() def ver_check(): import pkg_resources version = None try: version = pkg_resources.get_distribution('feedr').version except Exception as e: print(e) finally: del pkg_resources return version def feeder_run(o):