Skip to content

Commit

Permalink
Fixed logging in MangaUpdates
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePromidius committed Feb 8, 2024
1 parent 32663f4 commit 722db90
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ def _get_series_id(cls, search_params, logging_info):
try:
response = requests.post('https://api.mangaupdates.com/v1/series/search', json=search_params)
except Exception as e:
cls.logger.exception(e, extra=logging_info)
cls.logger.warning('Manga Manager is unfamiliar with this error. Please log an issue for investigation.',
cls._log.exception(e, extra=logging_info)
cls._log.warning('Manga Manager is unfamiliar with this error. Please log an issue for investigation.',
extra=logging_info)
return None

cls.logger.debug(f'Search Params: {search_params}')
# cls.logger.debug(f'Response JSON: {response.json()}')
cls._log.debug(f'Search Params: {search_params}')
# cls._log.debug(f'Response JSON: {response.json()}')

if len(response.json()['results']) == 0:
raise MangaNotFoundError("MangaUpdates",search_params['search'])
Expand All @@ -114,8 +114,8 @@ def _get_series_details(cls, manga_title, logging_info):
try:
series_details = requests.get('https://api.mangaupdates.com/v1/series/' + str(cls._get_series_id(search_params, {})))
except Exception as e:
cls.logger.exception(e, extra=logging_info)
cls.logger.warning('Manga Manager is unfamiliar with this error. Please log an issue for investigation.',
cls._log.exception(e, extra=logging_info)
cls._log.warning('Manga Manager is unfamiliar with this error. Please log an issue for investigation.',
extra=logging_info)
return None

Expand Down

0 comments on commit 722db90

Please sign in to comment.