Django Influx Logs: put your application logs into InfluxDB.
Project description
Django Influx Logs
Put your application logs into InfluxDB
Install
pip install django-influx-logs
Settings
INFLUX_LOGS_ENABLE = True
INFLUX_LOGS_HOST = "localhost"
INFLUX_LOGS_PORT = 8086
INFLUX_LOGS_USERNAME = "my_user"
INFLUX_LOGS_PASSWORD = "mu_psw"
INFLUX_LOGS_DATABASE = "my_db"
Usage example
class SomeDownloadView(View):
def log_download_action(self, filename):
tags = {"env_name": "staging"}
log_action(
actor=self.request.user.email,
verb="downloaded",
action_object=filename,
tags=tags,
)
def get(self):
# At some point here, we want to log the user's action
self.log_download_action(filename="my-file.txt")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-influx-logs-0.0.4.tar.gz
.
File metadata
- Download URL: django-influx-logs-0.0.4.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb8726dc6c10d4db4552c1a983eeec03fc632c77759bbfa64c2dd6161a933e18 |
|
MD5 | d3e6babe0820620aae49a4e7e2c60fcc |
|
BLAKE2b-256 | 48cd4d4c20f0121739739192bf66ed6b58583963e91364a8ce7abab504733b6d |
File details
Details for the file django_influx_logs-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: django_influx_logs-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa6b919d35b4376c9b9d6ee93eb27e49a9c1767f336ccac19d77b708d097539d |
|
MD5 | c1a1e39bcf38a19b007b79370940732c |
|
BLAKE2b-256 | c850326ae6206893086972ca429286754d2022faa966bd70d865d6c7f7a337fb |