Skip to content

bug: Debug log displayed many times #44

@pawamoy

Description

@pawamoy

Description of the bug

The following logs shows up many times with verbose mode enabled:

mkdocs_autorefs: Enabling Markdown anchors feature

It comes from here:

log.debug("Enabling Markdown anchors feature")

To Reproduce

Just use latest version and run mkdocs serve -v.

Expected behavior

We should display it only once, or not at all.

Environment information

python -m mkdocs_autorefs.debug  # | xclip -selection clipboard
  • System: Linux-6.8.1-arch1-1-x86_64-with-glibc2.39
  • Python: cpython 3.11.5
  • Environment variables:
    • PYTHONPATH: /home/pawamoy/.local/pipx/venvs/pdm/lib/python3.11/site-packages/pdm/pep582
  • Installed packages:
    • mkdocs-autorefs v1.0.1

Additional context

We could use a class variable to check if the message was already logged.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions