Skip to content

Commit

Permalink
Fix log-level option
Browse files Browse the repository at this point in the history
  • Loading branch information
ltm committed Oct 28, 2020
1 parent 0c76840 commit 50e127e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions icloudpd/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import sys
import logging
from logging import DEBUG, INFO
from logging import INFO


class IPDLogger(logging.Logger):
Expand Down Expand Up @@ -32,11 +32,10 @@ def tqdm_write(self, message, loglevel=INFO):
self.tqdm.write(message)


def setup_logger(loglevel=DEBUG):
def setup_logger():
"""Set up logger and add stdout handler"""
logging.setLoggerClass(IPDLogger)
logger = logging.getLogger("icloudpd")
logger.setLevel(loglevel)
has_stdout_handler = False
for handler in logger.handlers:
if handler.name == "stdoutLogger":
Expand Down

0 comments on commit 50e127e

Please sign in to comment.