# Log-based testing 🪵
[](https://python-poetry.org/)
[](https://github.com/etianen/logot/actions/workflows/build.yml)
[](https://codecov.io/gh/etianen/logot)
[](https://logot.readthedocs.io)
[](https://pypi.org/project/logot/)
[](https://pypi.org/project/logot/)
`logot` makes it easy to test whether your code is logging correctly:
```python
from logot import Logot, logged
def test_something(logot: Logot) -> None:
do_something()
logot.assert_logged(logged.info("Something was done"))
```
`logot` integrates with popular testing frameworks (e.g. [`pytest`](https://logot.readthedocs.io/latest/using-pytest.html), [`unittest`](https://logot.readthedocs.io/latest/using-unittest.html)). It supports many 3rd-party [asynchronous](https://logot.readthedocs.io/latest/integrations/index.html#asynchronous-frameworks) and [logging](https://logot.readthedocs.io/latest/integrations/index.html#logging-frameworks) frameworks, and can be extended to support many more. 💪
## Documentation 📖
Full documentation is published on [Read the Docs](https://logot.readthedocs.io). Learn more about `logot` with the following guides:
- [Log message matching](https://logot.readthedocs.io/latest/log-message-matching.html)
- [Log pattern matching](https://logot.readthedocs.io/latest/log-pattern-matching.html)
- [Log capturing](https://logot.readthedocs.io/latest/log-capturing.html)
- [Using with `pytest`](https://logot.readthedocs.io/latest/using-pytest.html)
- [Using with `unittest`](https://logot.readthedocs.io/latest/using-unittest.html)
- [Installing](https://logot.readthedocs.io/latest/installing.html)
## Bugs / feedback 🐛
Issue tracking is hosted on [GitHub](https://github.com/etianen/logot/issues).
## Changelog 🏗️
Release notes are published on [GitHub](https://github.com/etianen/logot/releases).
## License ⚖️
`logot` is published as open-source software under the [MIT license](https://github.com/etianen/logot/blob/main/LICENSE).
Raw data
{
"_id": null,
"home_page": "https://logot.readthedocs.io",
"name": "logot",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "test, unittest, pytest, logging",
"author": "Dave Hall",
"author_email": "dave@etianen.com",
"download_url": "https://files.pythonhosted.org/packages/4e/af/cd1c90235d604d388116fd9dc5fa106a2feca314b426bc0b071c60ad1bb5/logot-1.5.1.tar.gz",
"platform": null,
"description": "# Log-based testing \ud83e\udeb5\n\n[](https://python-poetry.org/)\n[](https://github.com/etianen/logot/actions/workflows/build.yml)\n[](https://codecov.io/gh/etianen/logot)\n[](https://logot.readthedocs.io)\n[](https://pypi.org/project/logot/)\n[](https://pypi.org/project/logot/)\n\n`logot` makes it easy to test whether your code is logging correctly:\n\n```python\nfrom logot import Logot, logged\n\ndef test_something(logot: Logot) -> None:\n do_something()\n logot.assert_logged(logged.info(\"Something was done\"))\n```\n\n`logot` integrates with popular testing frameworks (e.g. [`pytest`](https://logot.readthedocs.io/latest/using-pytest.html), [`unittest`](https://logot.readthedocs.io/latest/using-unittest.html)). It supports many 3rd-party [asynchronous](https://logot.readthedocs.io/latest/integrations/index.html#asynchronous-frameworks) and [logging](https://logot.readthedocs.io/latest/integrations/index.html#logging-frameworks) frameworks, and can be extended to support many more. \ud83d\udcaa\n\n## Documentation \ud83d\udcd6\n\nFull documentation is published on [Read the Docs](https://logot.readthedocs.io). Learn more about `logot` with the following guides:\n\n- [Log message matching](https://logot.readthedocs.io/latest/log-message-matching.html)\n- [Log pattern matching](https://logot.readthedocs.io/latest/log-pattern-matching.html)\n- [Log capturing](https://logot.readthedocs.io/latest/log-capturing.html)\n- [Using with `pytest`](https://logot.readthedocs.io/latest/using-pytest.html)\n- [Using with `unittest`](https://logot.readthedocs.io/latest/using-unittest.html)\n- [Installing](https://logot.readthedocs.io/latest/installing.html)\n\n\n## Bugs / feedback \ud83d\udc1b\n\nIssue tracking is hosted on [GitHub](https://github.com/etianen/logot/issues).\n\n\n## Changelog \ud83c\udfd7\ufe0f\n\nRelease notes are published on [GitHub](https://github.com/etianen/logot/releases).\n\n\n## License \u2696\ufe0f\n\n`logot` is published as open-source software under the [MIT license](https://github.com/etianen/logot/blob/main/LICENSE).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Test whether your code is logging correctly \ud83e\udeb5",
"version": "1.5.1",
"project_urls": {
"Changelog": "https://github.com/etianen/logot/releases",
"Documentation": "https://logot.readthedocs.io",
"Homepage": "https://logot.readthedocs.io",
"Repository": "https://github.com/etianen/logot",
"Tracker": "https://github.com/etianen/logot/issues"
},
"split_keywords": [
"test",
" unittest",
" pytest",
" logging"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "634c0d17624e120c539243162fcc6d4b25506cd7eeee13fbb3fe16900059315c",
"md5": "3408b00b4dd18cf272cf6400e2a22076",
"sha256": "3a48e4c9e09ee6fd1e3f2032319b2038dc471d655fcce268b05d97d0531d21c1"
},
"downloads": -1,
"filename": "logot-1.5.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3408b00b4dd18cf272cf6400e2a22076",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 22034,
"upload_time": "2025-07-28T11:40:57",
"upload_time_iso_8601": "2025-07-28T11:40:57.912311Z",
"url": "https://files.pythonhosted.org/packages/63/4c/0d17624e120c539243162fcc6d4b25506cd7eeee13fbb3fe16900059315c/logot-1.5.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4eafcd1c90235d604d388116fd9dc5fa106a2feca314b426bc0b071c60ad1bb5",
"md5": "859ad16fdbcdb12eed30c9a7f802e891",
"sha256": "fbf83531e92059f3e6783850d355521da333ddee94a445aecc5867eb8a0db54f"
},
"downloads": -1,
"filename": "logot-1.5.1.tar.gz",
"has_sig": false,
"md5_digest": "859ad16fdbcdb12eed30c9a7f802e891",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 14215,
"upload_time": "2025-07-28T11:40:59",
"upload_time_iso_8601": "2025-07-28T11:40:59.089647Z",
"url": "https://files.pythonhosted.org/packages/4e/af/cd1c90235d604d388116fd9dc5fa106a2feca314b426bc0b071c60ad1bb5/logot-1.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-28 11:40:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "etianen",
"github_project": "logot",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "logot"
}