mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Set verbose default back to false
This commit is contained in:
parent
2dd256e939
commit
542718d311
4 changed files with 12 additions and 12 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
[general]
|
[general]
|
||||||
# A folder where vdirsyncer can store some metadata about each pair.
|
# A folder where vdirsyncer can store some metadata about each pair.
|
||||||
status_path = ~/.vdirsyncer/status/
|
status_path = ~/.vdirsyncer/status/
|
||||||
#verbose = True
|
#verbose = False # setting this to true will show e.g. HTTP traffic
|
||||||
|
|
||||||
# CONTACTS
|
# CONTACTS
|
||||||
[pair bob_contacts]
|
[pair bob_contacts]
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ def _main(env, file_cfg):
|
||||||
'_'.join(filter(bool, (pair_name, collection)))
|
'_'.join(filter(bool, (pair_name, collection)))
|
||||||
pair_description = \
|
pair_description = \
|
||||||
' from '.join(filter(bool, (collection, pair_name)))
|
' from '.join(filter(bool, (collection, pair_name)))
|
||||||
cli_logger.debug('Syncing {}'.format(pair_description))
|
cli_logger.info('Syncing {}'.format(pair_description))
|
||||||
status = load_status(general['status_path'], status_name)
|
status = load_status(general['status_path'], status_name)
|
||||||
sync(a, b, status,
|
sync(a, b, status,
|
||||||
pair_options.get('conflict_resolution', None))
|
pair_options.get('conflict_resolution', None))
|
||||||
|
|
@ -191,7 +191,7 @@ def _main(env, file_cfg):
|
||||||
|
|
||||||
app.register_command('sync', sync_command)
|
app.register_command('sync', sync_command)
|
||||||
|
|
||||||
if general.get('verbose', True):
|
if general.get('verbose', False):
|
||||||
verbose_option()
|
verbose_option()
|
||||||
else:
|
else:
|
||||||
quiet_option()
|
quiet_option()
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import sys
|
||||||
|
|
||||||
|
|
||||||
stdout_handler = logging.StreamHandler(sys.stdout)
|
stdout_handler = logging.StreamHandler(sys.stdout)
|
||||||
default_level = logging.WARNING
|
default_level = logging.INFO
|
||||||
|
|
||||||
|
|
||||||
def create_logger(name):
|
def create_logger(name):
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ def action_upload(uid, source, dest):
|
||||||
def inner(storages, status, conflict_resolution):
|
def inner(storages, status, conflict_resolution):
|
||||||
source_storage, source_list, source_uid_to_href = storages[source]
|
source_storage, source_list, source_uid_to_href = storages[source]
|
||||||
dest_storage, dest_list, dest_uid_to_href = storages[dest]
|
dest_storage, dest_list, dest_uid_to_href = storages[dest]
|
||||||
sync_logger.debug('Copying (uploading) item {} to {}'
|
sync_logger.info('Copying (uploading) item {} to {}'
|
||||||
.format(uid, dest_storage))
|
.format(uid, dest_storage))
|
||||||
|
|
||||||
source_href = source_uid_to_href[uid]
|
source_href = source_uid_to_href[uid]
|
||||||
|
|
@ -112,7 +112,7 @@ def action_update(uid, source, dest):
|
||||||
def inner(storages, status, conflict_resolution):
|
def inner(storages, status, conflict_resolution):
|
||||||
source_storage, source_list, source_uid_to_href = storages[source]
|
source_storage, source_list, source_uid_to_href = storages[source]
|
||||||
dest_storage, dest_list, dest_uid_to_href = storages[dest]
|
dest_storage, dest_list, dest_uid_to_href = storages[dest]
|
||||||
sync_logger.debug('Copying (updating) item {} to {}'
|
sync_logger.info('Copying (updating) item {} to {}'
|
||||||
.format(uid, dest_storage))
|
.format(uid, dest_storage))
|
||||||
source_href = source_uid_to_href[uid]
|
source_href = source_uid_to_href[uid]
|
||||||
source_etag = source_list[source_href]['etag']
|
source_etag = source_list[source_href]['etag']
|
||||||
|
|
@ -134,13 +134,13 @@ def action_delete(uid, source, dest):
|
||||||
def inner(storages, status, conflict_resolution):
|
def inner(storages, status, conflict_resolution):
|
||||||
if dest is not None:
|
if dest is not None:
|
||||||
dest_storage, dest_list, dest_uid_to_href = storages[dest]
|
dest_storage, dest_list, dest_uid_to_href = storages[dest]
|
||||||
sync_logger.debug('Deleting item {} from {}'
|
sync_logger.info('Deleting item {} from {}'
|
||||||
.format(uid, dest_storage))
|
.format(uid, dest_storage))
|
||||||
dest_href = dest_uid_to_href[uid]
|
dest_href = dest_uid_to_href[uid]
|
||||||
dest_etag = dest_list[dest_href]['etag']
|
dest_etag = dest_list[dest_href]['etag']
|
||||||
dest_storage.delete(dest_href, dest_etag)
|
dest_storage.delete(dest_href, dest_etag)
|
||||||
else:
|
else:
|
||||||
sync_logger.debug('Deleting status info for nonexisting item {}'
|
sync_logger.info('Deleting status info for nonexisting item {}'
|
||||||
.format(uid))
|
.format(uid))
|
||||||
del status[uid]
|
del status[uid]
|
||||||
|
|
||||||
|
|
@ -149,7 +149,7 @@ def action_delete(uid, source, dest):
|
||||||
|
|
||||||
def action_conflict_resolve(uid):
|
def action_conflict_resolve(uid):
|
||||||
def inner(storages, status, conflict_resolution):
|
def inner(storages, status, conflict_resolution):
|
||||||
sync_logger.debug('Doing conflict resolution for item {}...'
|
sync_logger.info('Doing conflict resolution for item {}...'
|
||||||
.format(uid))
|
.format(uid))
|
||||||
a_storage, list_a, a_uid_to_href = storages['a']
|
a_storage, list_a, a_uid_to_href = storages['a']
|
||||||
b_storage, list_b, b_uid_to_href = storages['b']
|
b_storage, list_b, b_uid_to_href = storages['b']
|
||||||
|
|
@ -158,15 +158,15 @@ def action_conflict_resolve(uid):
|
||||||
a_meta = list_a[a_href]
|
a_meta = list_a[a_href]
|
||||||
b_meta = list_b[b_href]
|
b_meta = list_b[b_href]
|
||||||
if a_meta['obj'].raw == b_meta['obj'].raw:
|
if a_meta['obj'].raw == b_meta['obj'].raw:
|
||||||
sync_logger.debug('...same content on both sides.')
|
sync_logger.info('...same content on both sides.')
|
||||||
status[uid] = a_href, a_meta['etag'], b_href, b_meta['etag']
|
status[uid] = a_href, a_meta['etag'], b_href, b_meta['etag']
|
||||||
elif conflict_resolution is None:
|
elif conflict_resolution is None:
|
||||||
raise exceptions.SyncConflict()
|
raise exceptions.SyncConflict()
|
||||||
elif conflict_resolution == 'a wins':
|
elif conflict_resolution == 'a wins':
|
||||||
sync_logger.debug('...{} wins.'.format(a_storage))
|
sync_logger.info('...{} wins.'.format(a_storage))
|
||||||
action_update(uid, 'a', 'b')(storages, status, conflict_resolution)
|
action_update(uid, 'a', 'b')(storages, status, conflict_resolution)
|
||||||
elif conflict_resolution == 'b wins':
|
elif conflict_resolution == 'b wins':
|
||||||
sync_logger.debug('...{} wins.'.format(b_storage))
|
sync_logger.info('...{} wins.'.format(b_storage))
|
||||||
action_update(uid, 'b', 'a')(storages, status, conflict_resolution)
|
action_update(uid, 'b', 'a')(storages, status, conflict_resolution)
|
||||||
else:
|
else:
|
||||||
raise ValueError('Invalid conflict resolution mode: {}'
|
raise ValueError('Invalid conflict resolution mode: {}'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue