Skip to content

Commit

Permalink
Move logger to class static in TokenAuth
Browse files Browse the repository at this point in the history
It doesn't need to be instance specific, let it be class specific
  • Loading branch information
glensc committed Jan 31, 2025
1 parent 4d5ae04 commit b114445
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion trakt/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,15 @@ class TokenAuth(AuthBase):
#: How many times to attempt token auth refresh before failing
MAX_RETRIES = 1

logger = logging.getLogger(__name__)

def __init__(self, client: HttpClient, config: AuthConfig):
super().__init__()
self.config = config
self.client = client
# OAuth token validity checked
self.OAUTH_TOKEN_VALID = None
self.refresh_attempts = 0
self.logger = logging.getLogger('trakt.api.token_auth')

def __call__(self, r):
# Skip oauth requests
Expand Down

0 comments on commit b114445

Please sign in to comment.