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
Close
Hashes for django_influx_logs-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d7014028244e44a52cf2d0b3c2f86b7d24ab83efe8753e16c9d5da847b56dc4 |
|
MD5 | 27566f7b67d5cbff87721d16938e0a6e |
|
BLAKE2b-256 | 2e97cbaac0015bde1e00780022c88edbfc6c6dc8eca425f0b32545efb6e97ad6 |