Skip to content

Commit b1a70fe

Browse files
monitor: format host/user as user@host in text output
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7e90162 commit b1a70fe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/borg/archiver/monitor_cmd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _monitor_read(self, args, repository):
111111

112112
@staticmethod
113113
def _unit_label(report):
114-
who = f"{report.get('hostname', '?')}/{report.get('username', '?')}"
114+
who = f"{report.get('username', '?')}@{report.get('hostname', '?')}"
115115
return f"{who} {report.get('archive') or report.get('command')}"
116116

117117
def _monitor_output(self, args, entries):
@@ -153,7 +153,7 @@ def _monitor_output(self, args, entries):
153153
print(f"{self._unit_label(report)}:")
154154
print(f" command: {report.get('command')}")
155155
print(f" status: {report.get('status')} (rc {report.get('rc')})")
156-
print(f" host/user: {report.get('hostname', '-')} / {report.get('username', '-')}")
156+
print(f" user@host: {report.get('username', '-')}@{report.get('hostname', '-')}")
157157
print(f" archive: {report.get('archive', '-')}")
158158
print(f" time: {report.get('time')}")
159159
print(f" age: {int(e['age'])}s (max {args.max_age}s){' STALE' if e['stale'] else ''}")

0 commit comments

Comments
 (0)