diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0a4483b..c089a51 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,8 @@ Version 0.16.2 - Fix crash when using daterange or item_type filters in :storage:`google_calendar`, see :gh:`657`. +- **Packagers:** Fixes for new version ``0.2.0`` of ``click-log``. The version + requirements for the dependency ``click-log`` changed. Version 0.16.1 ============== diff --git a/setup.py b/setup.py index 3002fef..8b2d582 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from setuptools import Command, find_packages, setup requirements = [ # https://github.com/mitsuhiko/click/issues/200 'click>=5.0', - 'click-log>=0.1.3', + 'click-log>=0.2.0, <0.3.0', # https://github.com/pimutils/vdirsyncer/issues/478 'click-threading>=0.2', diff --git a/vdirsyncer/cli/__init__.py b/vdirsyncer/cli/__init__.py index 69402dd..b87ccbd 100644 --- a/vdirsyncer/cli/__init__.py +++ b/vdirsyncer/cli/__init__.py @@ -12,6 +12,7 @@ from .. import BUGTRACKER_HOME, __version__ cli_logger = logging.getLogger(__name__) +click_log.basic_config('vdirsyncer') class AppContext(object): @@ -38,8 +39,7 @@ def catch_errors(f): @click.group() -@click_log.init('vdirsyncer') -@click_log.simple_verbosity_option() +@click_log.simple_verbosity_option('vdirsyncer') @click.version_option(version=__version__) @click.option('--config', '-c', metavar='FILE', help='Config file to use.') @pass_context @@ -64,7 +64,7 @@ main = app def max_workers_callback(ctx, param, value): - if value == 0 and click_log.get_level() == logging.DEBUG: + if value == 0 and logging.getLogger('vdirsyncer').level == logging.DEBUG: value = 1 cli_logger.debug('Using {} maximal workers.'.format(value))