mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-23 06:31:58 +00:00
Pass args.log_json to FilesystemObjectProcessors/Statistics instance
This commit is contained in:
parent
940768ef2a
commit
a84ead8e7c
2 changed files with 5 additions and 3 deletions
|
@ -1200,7 +1200,8 @@ class FilesystemObjectProcessors:
|
|||
|
||||
def __init__(self, *, metadata_collector, cache, key,
|
||||
add_item, process_file_chunks,
|
||||
chunker_params, show_progress, sparse):
|
||||
chunker_params, show_progress, sparse,
|
||||
log_json):
|
||||
self.metadata_collector = metadata_collector
|
||||
self.cache = cache
|
||||
self.key = key
|
||||
|
@ -1209,7 +1210,7 @@ def __init__(self, *, metadata_collector, cache, key,
|
|||
self.show_progress = show_progress
|
||||
|
||||
self.hard_links = {}
|
||||
self.stats = Statistics() # threading: done by cache (including progress)
|
||||
self.stats = Statistics(output_json=log_json) # threading: done by cache (including progress)
|
||||
self.cwd = os.getcwd()
|
||||
self.chunker = get_chunker(*chunker_params, seed=key.chunk_seed, sparse=sparse)
|
||||
|
||||
|
|
|
@ -657,7 +657,8 @@ def create_inner(archive, cache, fso):
|
|||
checkpoint_interval=args.checkpoint_interval, rechunkify=False)
|
||||
fso = FilesystemObjectProcessors(metadata_collector=metadata_collector, cache=cache, key=key,
|
||||
process_file_chunks=cp.process_file_chunks, add_item=archive.add_item,
|
||||
chunker_params=args.chunker_params, show_progress=args.progress, sparse=args.sparse)
|
||||
chunker_params=args.chunker_params, show_progress=args.progress, sparse=args.sparse,
|
||||
log_json=args.log_json)
|
||||
create_inner(archive, cache, fso)
|
||||
else:
|
||||
create_inner(None, None, None)
|
||||
|
|
Loading…
Reference in a new issue