Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ dependencies = [
"backports-zstd; python_version < '3.14'", # for python < 3.14.
"xxhash>=2.0.0",
"jsonargparse>=4.47.0",
"PyYAML>=6.0.2", # we need to register our types with yaml, jsonargparse uses yaml for config files
"PyYAML>=6.0.2",
"structlog",
]

[project.optional-dependencies]
Expand Down
3 changes: 1 addition & 2 deletions src/borg/helpers/misc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import logging
import io
import os
import platform # python stdlib import - if this fails, check that cwd != src/borg/
Expand Down Expand Up @@ -58,7 +57,7 @@ def sysinfo():
return "\n".join(info)


def log_multi(*msgs, level=logging.INFO, logger=logger):
def log_multi(*msgs, level=20, logger=logger):
"""
Log multiple lines of text, emitting each line via a separate logging call for cosmetic reasons.
Expand Down
4 changes: 2 additions & 2 deletions src/borg/helpers/yes_no.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import logging
import structlog
import json
import os
import os.path
Expand Down Expand Up @@ -62,7 +62,7 @@ def yes(
"""

def output(msg, msg_type, is_prompt=False, **kwargs):
json_output = getattr(logging.getLogger("borg"), "json", False)
json_output = getattr(structlog.get_logger("borg"), "json", False)
if json_output:
kwargs |= dict(type="question_%s" % msg_type, msgid=msgid, message=msg)
print(json.dumps(kwargs), file=sys.stderr)
Expand Down
Loading