Skip to content

Commit cf19489

Browse files
committed
improve(integrations): add some debug logs
1 parent 712e21b commit cf19489

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

mkdocs_rss_plugin/integrations/theme_material_social_plugin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,10 +336,16 @@ def get_social_card_cache_path_for_page(
336336
self.integration_material_blog.IS_BLOG_PLUGIN_ENABLED
337337
and self.integration_material_blog.is_page_a_blog_post(mkdocs_page)
338338
):
339+
logger.debug(
340+
f"Looking for social card in cache for blog post: {mkdocs_page.src_uri}"
341+
)
339342
expected_cached_card_path = self.social_cards_cache_dir.joinpath(
340343
f"assets/images/social/{Path(mkdocs_page.dest_uri).parent}.png"
341344
)
342345
else:
346+
logger.debug(
347+
f"Looking for social card in cache for page: {mkdocs_page.src_uri}"
348+
)
343349
expected_cached_card_path = self.social_cards_cache_dir.joinpath(
344350
f"assets/images/social/{Path(mkdocs_page.src_uri).with_suffix('.png')}"
345351
)

mkdocs_rss_plugin/util.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,9 @@ def load_images_for_pages(
571571
page_info._mkdocs_page_ref
572572
and id(page_info._mkdocs_page_ref) not in processed_refs
573573
):
574-
logger.debug(f"Get image for '{page_info.title}'")
574+
logger.debug(
575+
f"Get image for '{page_info.title}' ({page_info.abs_path})"
576+
)
575577
page_info.image = self.get_image(
576578
in_page=page_info._mkdocs_page_ref, base_url=base_url
577579
)

0 commit comments

Comments
 (0)