Skip to content

Commit a2c2b62

Browse files
committed
style: show how you can add messages to the processing log
1 parent d240591 commit a2c2b62

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

examples/custom_processing/bake.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ def process_document(document: Document) -> None:
2828
# Note: This is for demonstration. Could use the wordwrap filter in template.
2929
wrapped_alt_text = wordwrap(data["alt"], max_chars=60)
3030

31+
# Log a message to show during document processing
32+
document.log_info("Setting XKCD data for template context 🙂")
33+
3134
# Update config/template context with XKCD info
3235
document.config.xkcd = {
3336
"title": data["title"],

0 commit comments

Comments
 (0)