[IMP] add information in error message

Not always clear what was the issue with only the keyword
This commit is contained in:
Martin 2024-11-11 14:43:09 +01:00
commit 31538d1578
2 changed files with 3 additions and 2 deletions

View file

@ -358,8 +358,9 @@ class Content:
origin = joiner(siteurl, Author(path, self.settings).url)
else:
logger.warning(
"Replacement Indicator '%s' not recognized, skipping replacement",
"Replacement Indicator %r not recognized in %r, skipping replacement",
what,
origin,
)
# keep all other parts, such as query, fragment, etc.

View file

@ -1036,7 +1036,7 @@ class TestStatic(LoggedTestCase):
self.assertEqual(content, html)
self.assertLogCountEqual(
count=1,
msg="Replacement Indicator 'unknown' not recognized, "
msg="Replacement Indicator 'unknown' not recognized in '{unknown}foo', "
"skipping replacement",
level=logging.WARNING,
)