Allows download django log file via api
Project description
django-log-api
Allows download django log file via api
Requirements
- django >= 2.2
- djangorestframework >= 3.9.2
- tailhead
Installation
- Install package
pip install django-log-api
# or
poetry add django-log-api
- Add to the INSTALLED_APPS
settings.py
INSTALLED_APPS = [
...,
"log_api",
]
# log dir path, use Path(), default: BASE_DIR / logs
LOG_API_DIR_PATH = BASE_DIR / "logs"
# log file name, default: 'django.log'
LOG_API_DEFAULT_FILE = "django.log"
# log tail numbers, default: 1000
LOG_API_MAX_READ_LINES = 1000
# log api permission, use drf`s permission, default: AllowAny
LOG_API_PERMISSION_CLASSES = ("rest_framework.permissions.AllowAny",)
- add to urls.py
path(r"logs/", include("log_api.urls")),
parameters:
- name: log file name
- tail: if null, download entire log file, others the tail lines number
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
django-log-api-0.1.3.tar.gz
(4.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-log-api-0.1.3.tar.gz.
File metadata
- Download URL: django-log-api-0.1.3.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.7 Darwin/21.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
670afbed5389f102f7c9f76888667f9c89de63f6c64206042c7761bff867ee98
|
|
| MD5 |
c2815edef907fa26eba99376d183d7a2
|
|
| BLAKE2b-256 |
2cc83900d31ce0b81075297419b8f0764055239464e4a5e9bea7f8e415baf582
|
File details
Details for the file django_log_api-0.1.3-py3-none-any.whl.
File metadata
- Download URL: django_log_api-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.7 Darwin/21.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3869a91406c71d87cbbe4d87c239fc718e1ff125f26908549f85c0f8fe6d039c
|
|
| MD5 |
d6abaf3793c2b8af0cd03cb52aa7bc78
|
|
| BLAKE2b-256 |
f22fa8e6adab41cd777fa8c8f6faa27dab4b4cf19d4af7c1cba18a19b3278fbf
|