{"repo":"revsys/jslog4kube","free":true,"listed":false,"github":"https://github.com/revsys/jslog4kube","clone":"git clone https://github.com/revsys/jslog4kube.git","description":"Make it easy to emit JSON structured logging to stdout for Python apps and WSGI apps running inside Gunicorn. Is geared toward deployment on Kubernetes, but can be used without Kube or Gunicorn.","language":"Python","stars":34,"topics":["kubernetes","kube","k8s","logging","logger","json","django"],"license":"BSD-3-Clause","category":"deployment-docker-iac","readme_excerpt":"jslog4kube (python/JSON logging for kubernetes pod/containers) Why? provide a JSON-to-stdout setup for python provide the same JSON-to-stdout setup for gunicorn because creating complex log collector configs to handle whatever that other person thought was a good-idea-at-the-time is for the birds. We want to make it easier for our clients and ourselves to start new projects that emit good logging. Install You can install jslog4kube from PyPI with: or better yet, with uv making it go Two environment variables configure this module: KUBE META : specifies the mount-point for the Kubernetes downward-API volumes bits (default: /etc/meta) KUBE META ENV PREFIX : the textual prefix for any environment variables targetted for inclusion in this pod’s log records (default: X) ---- --------------------------------------------------------------------------------------- These bits have been verified to be functional under python 3.9+ --------------------------------------------------------------------------------------- ---- From Django project settings.py gunicorn gunicorn.conf gunicorn CLI This will produce the following kind of output: Example Kubernetes deployment: Currently only metadata.(labels annotations) are supported for exposure via volume. ( Reasons , right?) environment variable prefixes (or: how to avoid looking like a complete idiot when you spam your data-store password into your logging system) You can use whatever letter or sequence for the prefix as long as it gets match","default_branch":null,"files":null,"tree":[],"storefront":"/r/revsys","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/revsys/jslog4kube/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}