Suppress Logs Plugin for MkDocs
MkDocs and its plugins often produce many informational log messages that, while helpful, can clutter your terminal during site builds and make real issues harder to spot.
This plugin allows you to silence specific log messages using customizable wildcard patterns. It's especially useful for suppressing known, non-critical log lines such as:
INFO - Doc file 'some.md' contains an absolute link '/path', it was left as is.
INFO - Doc file 'other.md' contains an unrecognized relative link '../foo', it was left as is.
💡 Use Case
If you're using plugins like mkdocs-webcontext-plugin to rewrite links or your site intentionally contains absolute or unresolved relative links, this plugin can filter those benign warnings.
✅ Features
- Pattern-based filtering of log messages.
- Wildcard support using
{*}for variable sections. - Supports multiple loggers (like
mkdocs.structure.pages, etc.). - Keeps your terminal output clean and focused.
📦 Installation
Install from PyPI:
pip install mkdocs-suppress-logs-plugin
Or with Poetry:
poetry add mkdocs-suppress-logs-plugin
⚙️ Configuration
Add the plugin to your mkdocs.yml:
plugins:
- suppress_logs:
patterns:
- "Doc file '{*}' contains an absolute link '{*}', it was left as is."
- "Doc file '{*}' contains an unrecognized relative link '{*}', it was left as is. Did you mean '{*}'?"
loggers:
- mkdocs.structure.pages
🔧 Pattern Matching
Use {*} as a wildcard in messages you want to suppress.
Example log line:
INFO - Doc file 'guide.md' contains an absolute link '/img.png', it was left as is.
Matching pattern:
Doc file '{*}' contains an absolute link '{*}', it was left as is.
This will suppress any message with that general structure, regardless of the exact file or link.
🧪 Tips
- To find the logger emitting a message, run MkDocs with
--verbose. - You can add multiple patterns and logger names.
- Regex is used under the hood, so avoid overly broad wildcards.
🙏 Thanks
This plugin was inspired by the need for clean terminal outputs during large MkDocs builds and complements:
🗪 License
MIT License – use freely, contribute generously.
Metadata
Release files for mkdocs-suppress-logs-plugin 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mkdocs_suppress_logs_plugin-0.1.1.tar.gz | 3.8 kB | Without provenance | Details for mkdocs_suppress_logs_plugin-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mkdocs_suppress_logs_plugin-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for mkdocs_suppress_logs_plugin-0.1.1-py3-none-any.whl |
Total release size: 8.1 kB
Release files / mkdocs_suppress_logs_plugin-0.1.1.tar.gz
| Download URL | mkdocs_suppress_logs_plugin-0.1.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff675b1d315eb28ae2b9a4f1ecb848e11b311ee02140f049270f0251276401a1
|
|
BLAKE2b-256 checksum How to use checksums |
d3ccefd285870e34c9dcb5c381d29698fda012371213a5b83bd23d8a783f6851
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / mkdocs_suppress_logs_plugin-0.1.1-py3-none-any.whl
| Download URL | mkdocs_suppress_logs_plugin-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5bb4c286006e6883f40b07cc45dd17043ba29653ada4c27240a60a3aa083f567
|
|
BLAKE2b-256 checksum How to use checksums |
599fea7e907b18a622334e6dbed2ba98ec91b616019f93f9cc4cc5d58797bfb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for mkdocs-suppress-logs-plugin 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.