mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-07-27 09:00:41 +08:00
perf(logging): optimize logging with rotation, async I/O, and lazy formatting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,7 +34,7 @@ class TitleParser:
|
||||
async def tmdb_parser(title: str, season: int, language: str):
|
||||
tmdb_info = await tmdb_parser(title, language)
|
||||
if tmdb_info:
|
||||
logger.debug(f"TMDB Matched, official title is {tmdb_info.title}")
|
||||
logger.debug("TMDB Matched, official title is %s", tmdb_info.title)
|
||||
tmdb_season = tmdb_info.last_season if tmdb_info.last_season else season
|
||||
return tmdb_info.title, tmdb_season, tmdb_info.year, tmdb_info.poster_link
|
||||
else:
|
||||
@@ -48,7 +48,7 @@ class TitleParser:
|
||||
bangumi.official_title, settings.rss_parser.language
|
||||
)
|
||||
if tmdb_info:
|
||||
logger.debug(f"TMDB Matched, official title is {tmdb_info.title}")
|
||||
logger.debug("TMDB Matched, official title is %s", tmdb_info.title)
|
||||
bangumi.poster_link = tmdb_info.poster_link
|
||||
else:
|
||||
logger.warning(
|
||||
@@ -86,7 +86,7 @@ class TitleParser:
|
||||
else:
|
||||
official_title = title_raw
|
||||
_season = episode.season
|
||||
logger.debug(f"RAW:{raw} >> {title_raw}")
|
||||
logger.debug("RAW:%s >> %s", raw, title_raw)
|
||||
return Bangumi(
|
||||
official_title=official_title,
|
||||
title_raw=title_raw,
|
||||
|
||||
Reference in New Issue
Block a user