- Python 80.2%
- Makefile 10.1%
- HTML 9.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
ci / test (3.11) (push) Successful in 26s
ci / test (3.15) (push) Successful in 31s
ci / lint (push) Successful in 54s
ci / test (3.10) (push) Successful in 27s
ci / test (3.12) (push) Successful in 29s
ci / test (3.13) (push) Successful in 28s
ci / test (3.14) (push) Successful in 30s
ci / publish (push) Successful in 22s
Closes #5 Monitoring plan, phase 5 rollout, same as the pilots argus/backend#45 and argus/frontend#35. ## Changes (`.forgejo/workflows/ci.yml`) - New step "Collect publish details for Argus": `ARGUS_ARTIFACT` = built wheel `name|bytes|package page`; `/tmp/dependencies.txt` = the runtime dependencies declared in `pyproject.toml` (`name specifier` lines, e.g. `Django >=4.2`). - Both publish-release calls (numbered release, devel snapshot) get `ARGUS_UPLOAD_TOKEN: ${{ secrets.ARGUS_UPLOAD_TOKEN }}` and `--artifact "$ARGUS_ARTIFACT" --dependencies /tmp/dependencies.txt`. A failed upload only warns, the release itself is unaffected. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA Reviewed-on: #6 |
||
| .forgejo/workflows | ||
| docs | ||
| src/vieuxhibou | ||
| tests | ||
| .gitignore | ||
| .pylintrc | ||
| .readthedocs.yaml | ||
| COPYING | ||
| COPYING.LESSER | ||
| Makefile | ||
| pyproject.toml | ||
| README.md | ||
| renovate.json | ||
| tox.ini | ||
vieuxhibou-django
Structured logging for Django: a registry of already-instantiated Python loggers, hot-reloadable (NOTSET/DEBUG/INFO/WARNING/ERROR/CRITICAL level, no process restart needed), plus optional registration/heartbeat with a central vieuxhibou server to drive those levels remotely from a dashboard shared with vieuxhibou-gin services.
Installation
pip install vieuxhibou-django
# settings.py
INSTALLED_APPS = [
...,
"vieuxhibou",
]
VIEUXHIBOU_SERVICE_NAME = "my-service"
VIEUXHIBOU_ENV = "prod"
VIEUXHIBOU_VERSION = "1.2.3"
# Optional: registration with a central vieuxhibou server.
# Leaving this empty disables registration/heartbeat (the logger
# registry stays usable locally either way).
VIEUXHIBOU_SERVER_URL = "https://vieuxhibou.example.org"
VIEUXHIBOU_SELF_URL = "https://my-service.example.org"
VIEUXHIBOU_SHARED_TOKEN = "..."
VIEUXHIBOU_HEARTBEAT_INTERVAL = 30 # seconds
python manage.py migrate
The vieuxhibou.urls routes (dashboard + /loggers/ API) need to be
mounted into the host project's urlconf, for example:
# urls.py
urlpatterns = [
...,
path("vieuxhibou/", include("vieuxhibou.urls")),
]
Level changes applied through the API are persisted (LoggerOverride)
and automatically reapplied the next time the process starts.
Development
make dev # venv + pip install -e ".[dev]"
make test # pytest, via tox
make lint # pylint (+ pylint-django)
make format-check # autopep8 --diff (CI)
make format # autopep8 --in-place (local)
make bandit # static security analysis
make tox # all tox environments at once
License
LGPLv3, see COPYING + COPYING.LESSER -- chosen over GPLv3 specifically because this package is meant to be imported (i.e. "linked", in the LGPL sense) by projects that have no reason of their own to be GPL.