Fixes for click-log 0.2.0

This commit is contained in:
Markus Unterwaditzer 2017-08-24 13:28:09 +02:00
parent 9930b4b3ca
commit 6954b26e0f
3 changed files with 6 additions and 4 deletions

View file

@ -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
==============

View file

@ -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',

View file

@ -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))