Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log output 1.0.x client -> 1.1.0 server #3195

Closed
ThomasWaldmann opened this issue Oct 20, 2017 · 5 comments
Closed

log output 1.0.x client -> 1.1.0 server #3195

ThomasWaldmann opened this issue Oct 20, 2017 · 5 comments

Comments

@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented Oct 20, 2017

$ borg-1.0.6 create -v tw@localhost:repo::test input
borg.output.progress Remote: Compacting segments   0%
borg.output.progress Remote: Compacting segments  50%
borg.output.progress Remote:

Same for 1.0.11 client.

The unusual borg.output.progress at the left is the logname included by the server and unexpected to show up there for a 1.0 client.

@ThomasWaldmann
Copy link
Member Author

ThomasWaldmann commented Oct 21, 2017

1.0 client supports these server log line formats:

$LOG <level> Remote: <msg>  # output via logging at level: "Remote: <msg>", line ending stripped
msg                         # output via stderr with "Remote: " prepended, line ending preserved

1.1 client supports these:

json
$LOG <level> <logname> Remote: <msg>  # output via logger <logname> at <level>, le stripped
$LOG <level> Remote: <msg>  # output via logging at level: "Remote: <msg>", line ending stripped
msg                         # output via stderr with "Remote: " prepended, line ending preserved

@ThomasWaldmann
Copy link
Member Author

ThomasWaldmann commented Oct 21, 2017

https://github.com/borgbackup/borg/blob/1.1.0/src/borg/logger.py#L92 there it includes the logname.

Hmm, as the server will talk json to any recent 1.1 client, just use the simpler format without logname for the non-json case? @enkore

ThomasWaldmann added a commit to ThomasWaldmann/borg that referenced this issue Oct 22, 2017
…gbackup#3195

1.0 clients do not understand this format, so it is just output to
screen, which is unexpected.

1.1 (>= 1.1.0b6) clients will get json from server, so it is not needed
for them either.
@enkore
Copy link
Contributor

enkore commented Oct 22, 2017

Should work. That's effectively another beta/RC format.

@ThomasWaldmann
Copy link
Member Author

ThomasWaldmann commented Oct 22, 2017

another issue: this is progress log output, so it should not be output at all (except with --progress).

problem: borg does not pass --progress to server, so the server can't suppress it based on that. so, the client would have to suppress it (which works fine in 1.1, but not 1.0).

the only way the client could suppress it (except running on WARNING level) is if the client knows the logger name.

so, rather support the $LOG format with logger name for future borg? wouldn't help for past 1.0 clients though.

@ThomasWaldmann ThomasWaldmann added this to the 1.1.2rc1 milestone Oct 22, 2017
@ThomasWaldmann ThomasWaldmann modified the milestones: 1.1.2rc1, 1.1.x Nov 4, 2017
@ThomasWaldmann
Copy link
Member Author

removing from milestone, this problem solves automatically as people upgrade to 1.1.x.

@ThomasWaldmann ThomasWaldmann removed this from the 1.1.x milestone Feb 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants