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

pass log_level to pyicloud library #1006

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
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
Loading