Skip to content

Commit 242f806

Browse files
committed
Refactor logging in Readarr API tagging functionality to use a unified logger instance, improving consistency and readability of log messages.
1 parent dff2aa0 commit 242f806

File tree

1 file changed

+4
-4
lines changed
  • src/primary/apps/readarr

1 file changed

+4
-4
lines changed

src/primary/apps/readarr/api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,18 +522,18 @@ def tag_processed_author(api_url: str, api_key: str, api_timeout: int, author_id
522522
# Get or create the tag
523523
tag_id = get_or_create_tag(api_url, api_key, api_timeout, tag_label)
524524
if tag_id is None:
525-
readarr_logger.error(f"Failed to get or create tag '{tag_label}' in Readarr")
525+
logger.error(f"Failed to get or create tag '{tag_label}' in Readarr")
526526
return False
527527

528528
# Add the tag to the author
529529
success = add_tag_to_author(api_url, api_key, api_timeout, author_id, tag_id)
530530
if success:
531-
readarr_logger.debug(f"Successfully tagged Readarr author {author_id} with '{tag_label}'")
531+
logger.debug(f"Successfully tagged Readarr author {author_id} with '{tag_label}'")
532532
return True
533533
else:
534-
readarr_logger.error(f"Failed to add tag '{tag_label}' to Readarr author {author_id}")
534+
logger.error(f"Failed to add tag '{tag_label}' to Readarr author {author_id}")
535535
return False
536536

537537
except Exception as e:
538-
readarr_logger.error(f"Error tagging Readarr author {author_id} with '{tag_label}': {e}")
538+
logger.error(f"Error tagging Readarr author {author_id} with '{tag_label}': {e}")
539539
return False

0 commit comments

Comments
 (0)