Skip to content

Commit

Permalink
Merge pull request #61 from DMcP89/enhancement/33-provide-a-way-to-en…
Browse files Browse the repository at this point in the history
…able-or-disable-logging

Enhancement/33 provide a way to enable or disable logging
  • Loading branch information
josuebrunel authored Apr 26, 2024
2 parents ddd01c2 + e161d1d commit 520a8f5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ data.yaml
oauth*.*
secrets.tar
*.swp
.python-version
1 change: 0 additions & 1 deletion yahoo_oauth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@


from yahoo_oauth.oauth import OAuth1, OAuth2
from yahoo_oauth.logger import YahooLogger
26 changes: 0 additions & 26 deletions yahoo_oauth/logger.py

This file was deleted.

9 changes: 6 additions & 3 deletions yahoo_oauth/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@

from yahoo_oauth.utils import services, CALLBACK_URI, STORE_FILE_FLAG
from yahoo_oauth.utils import get_data, write_data
from yahoo_oauth.logger import YahooLogger

logging.setLoggerClass(YahooLogger)

logger = logging.getLogger('yahoo_oauth')
logger.propagate = False
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter("[%(asctime)s %(levelname)s] [%(name)s.%(module)s.%(funcName)s] %(message)s")
stream_handler = logging.StreamHandler()
stream_handler.setFormatter(formatter)
logger.addHandler(stream_handler)


class BaseOAuth(object):
Expand Down

0 comments on commit 520a8f5

Please sign in to comment.