Skip to content

Commit

Permalink
pass log_level to pyicloud library
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebruyn committed Nov 26, 2024
1 parent 1a64294 commit 180bcf2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/icloudpd/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ def main(
stream=sys.stdout,
)
logger = logging.getLogger("icloudpd")
pyicloud_logger = logging.getLogger("pyicloud_ipd")
if only_print_filenames:
logger.disabled = True
else:
Expand All @@ -629,10 +630,13 @@ def main(
logger.disabled = False
if log_level == "debug":
logger.setLevel(logging.DEBUG)
pyicloud_logger.setLevel(logging.DEBUG)
elif log_level == "info":
logger.setLevel(logging.INFO)
pyicloud_logger.setLevel(logging.INFO)
elif log_level == "error":
logger.setLevel(logging.ERROR)
pyicloud_logger.setLevel(logging.ERROR)

with logging_redirect_tqdm():
# check required directory param only if not list albums
Expand Down

0 comments on commit 180bcf2

Please sign in to comment.