利用django + channels 实现Linux tail -f 功能
python 2.7+ / 3.4+ is recommended
用户登录后,可以查看在线日志。
pip install django==1.10
pip install channels==1.1.3
pip install asgi-redis==1.4.0
python manage.py makemigrations accounts
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
Edit settings.py
LOGTAIL_FILE = '/var/log/nginx/access.log'
多日志支持(测试版)
branch: multi-log
LOGTAIL_FILES = [
'/var/log/nginx/access.log',
'/var/log/messages',
]
增加search功能,待续...(done)- 增加click log line选中
多日志支持(done)