Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Debug log displayed many times #44

Closed
pawamoy opened this issue Mar 22, 2024 · 0 comments
Closed

bug: Debug log displayed many times #44

pawamoy opened this issue Mar 22, 2024 · 0 comments
Assignees

Comments

@pawamoy
Copy link
Member

pawamoy commented Mar 22, 2024

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.

@pawamoy pawamoy self-assigned this Mar 22, 2024
pawamoy added a commit that referenced this issue Aug 20, 2024
@pawamoy pawamoy closed this as completed Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant