django_live_log is a package which can see live stream of file, such as log file, etc.
pip install django_live_log
Add "django_live_log" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'django_live_log', ]
Include the django_live_log URLconf in your project urls.py like this:
url(r'^dll/', include('django_live_log.urls')),
Add "DLL_FILE" to settings.py:
DLL_FILE = '/var/log/myfile.log' (should have read permission)
- DLL_URL in settings.py.
- Usage:
DLL_URL = "/myurl/" so dll wii serve at domain.com/dll/myurl/
- DLL_GROUP_PERMISSION in settings.py
Group name or list of group names. Usage:
DLL_GROUP_PERMISSION = "My group name" # or ["My group name1", "My group name2"]
- from
Start pointer reading from file. Usage:
domain.com/dll/myurl/?from=500
- file_path
absolute path of file to log Usage:
domain.com/dll/myurl/?file_path=/var/log/myfile.log
- Should have read permission