mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-20 21:27:32 +00:00
implement --debug-topic for remote servers
This commit is contained in:
parent
b3b555395c
commit
97e9603531
1 changed files with 17 additions and 0 deletions
|
@ -654,6 +654,23 @@ def borg_cmd(self, args, testing):
|
|||
opts.append('--critical')
|
||||
else:
|
||||
raise ValueError('log level missing, fix this code')
|
||||
|
||||
# Tell the remote server about debug topics it may need to consider.
|
||||
# Note that debug topics are usable for "spew" or "trace" logs which would
|
||||
# be too plentiful to transfer for normal use, so the server doesn't send
|
||||
# them unless explicitly enabled.
|
||||
#
|
||||
# Needless to say, if you do --debug-topic=repository.compaction, for example,
|
||||
# with a 1.0.x server it won't work, because the server does not recognize the
|
||||
# option.
|
||||
#
|
||||
# This is not considered a problem, since this is a debugging feature that
|
||||
# should not be used for regular use.
|
||||
for topic in args.debug_topics:
|
||||
if '.' not in topic:
|
||||
topic = 'borg.debug.' + topic
|
||||
if 'repository' in topic:
|
||||
opts.append('--debug-topic=%s' % topic)
|
||||
env_vars = []
|
||||
if not hostname_is_unique():
|
||||
env_vars.append('BORG_HOSTNAME_IS_UNIQUE=no')
|
||||
|
|
Loading…
Reference in a new issue