-
now with 400+ notes, and a URL structure with redundant article slugs, eg:
or
I have many warnings printed while publishing, which is annoying, eg:
I have tried: import logging
LOG_FILTER = [(logging.WARN, 'There are %s items "%s" with lang %s')] which is note working. Note: the What am I doing wrong? Screenshots: https://notes.nicolasdeville.com/python/library-pelican/#warnings |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Unfortunately, that's not the template string. It is built dynamically (here) which makes it annoyingly unhelpful for this kind of filtering. Code should probably be adjusted to have a static template, so I would consider this a bug. For now, you can try adding multiple versions of this template import logging
LOG_FILTER = [
(logging.WARN, 'There are %s items "%s" with lang %s: \n%s\n%s'), # 2 item warning
(logging.WARN, 'There are %s items "%s" with lang %s: \n%s\n%s\n%s'), # 3 item warning
(logging.WARN, 'There are %s items "%s" with lang %s: \n%s\n%s\n%s\n%s'), # 4 item warning
# ... so on. depending on your site and the kind of warnings you get
] |
Beta Was this translation helpful? Give feedback.
Unfortunately, that's not the template string. It is built dynamically (here) which makes it annoyingly unhelpful for this kind of filtering. Code should probably be adjusted to have a static template, so I would consider this a bug. For now, you can try adding multiple versions of this template