new remote and progress logging, cleanups#7607
Merged
ThomasWaldmann merged 9 commits intoborgbackup:masterfrom May 29, 2023
Merged
new remote and progress logging, cleanups#7607ThomasWaldmann merged 9 commits intoborgbackup:masterfrom
ThomasWaldmann merged 9 commits intoborgbackup:masterfrom
Conversation
65c3ebb to
bbbaec6
Compare
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #7607 +/- ##
==========================================
- Coverage 83.95% 83.84% -0.11%
==========================================
Files 66 66
Lines 11747 11714 -33
Branches 2132 2115 -17
==========================================
- Hits 9862 9822 -40
- Misses 1321 1333 +12
+ Partials 564 559 -5
|
652870b to
0538447
Compare
Instead, install a handler that sends the LogRecord dicts to a queue. That queue is then emptied in the borg serve main loop and the LogRecords are sent msgpacked via stdout to the client, similar to the RPC results. On the client side, the LogRecords are recreated from the received dicts and fed into the clientside logging system. As we use msgpacked LogRecord dicts, we don't need JSON for this purpose on the borg serve side any more. On the client side, the LogRecords will then be either formatted as normal text or as JSON log output (by the clientside log formatter).
- simplify progress output (no \r, no terminal size related tweaks) - emit progress output via the logging system (so it does not use stderr of borg serve) - progress code always logs a json string, the json has all needed to either do json log output or plain text log output. - use formatters to generate plain or json output from that. - clean up setup_logging - use a StderrHandler that always uses the **current** sys.stderr - tweak TestPassphrase to not accidentally trigger just because of seeing 12 in output
for normal borg command invocation: - logging is set up in Archiver.run - the atexit handler calls logging.shutdown when process terminates for tests: - Archiver.run called by exec_cmd - no atexit handler executed as process lives on - borg.logger.teardown (calls shutdown and configured=False) now called in exec_cmd
- tears down logging (so no new log output is generated afterwards) - sends all queued log output - then returns also: make stdin_fd / stdout_fd instance variables
737d1b5 to
b46f10a
Compare
also: add missing param to RemoteRepositoryTestCase.open method, but ignore it.
b46f10a to
e2ea5cf
Compare
snorkelopstesting2-coder
pushed a commit
to snorkel-marlin-repos/borgbackup_borg_pr_7607_aad6a490-d038-40f9-8280-1f5bec90c0ac
that referenced
this pull request
Oct 22, 2025
Original PR #7607 by ThomasWaldmann Original: borgbackup/borg#7607
snorkelopsstgtesting1-spec
pushed a commit
to snorkel-marlin-repos/borgbackup_borg_pr_7607_9c695c36-8605-49a2-aca5-41c4c6629f52
that referenced
this pull request
Oct 22, 2025
Original PR #7607 by ThomasWaldmann Original: borgbackup/borg#7607
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.