Read & Download log files on the admin page
Project description
Django Log Reader
Django Log Reader allows you to read & download log files on the admin page.
This version designed for the Linux operating system and uses Linux commands to read files faster.
Why Django Log Reader?
- Reading files based on Linux commands speeds up the display of file content
- Download the result of the content
- Display all files according to the pattern defined in the
settings.py
- Simple interface
- Easy integration
How to use it
- Download and install latest version of Django Log Reader:
$ pip install django-log-reader
# or
$ easy_install django-log-reader
- Add
log_reader
application to theINSTALLED_APPS
setting of your Django projectsettings.py
file:
INSTALLED_APPS = (
# ...
"log_reader.apps.LogReaderConfig",
)
- You can Add the following value In your
settings.py
file:
# This value specifies the folder for the files. The default value is 'logs'
LOG_READER_DIR_PATH = 'logs'
# This value specifies the file extensions. The default value is '*.log'
LOG_READER_FILES_PATTERN = '*.log'
# This value specifies the default file. If there is no filter, the system reads the default file.
LOG_READER_DEFAULT_FILE = 'django.log'
# The contents of the files are separated based on this pattern.
LOG_READER_SPLIT_PATTERN = "\\n"
# This value indicates the number of lines of content in the file. Set the number of lines you want to read to this value.
LOG_READER_MAX_READ_LINES = 1000
# You can exclude files with this value.
LOG_READER_EXCLUDE_FILES = []
- Collect static if you are in production environment:
$ python manage.py collectstatic
- Clear your browser cache
Start the app
# Set up the database
$ python manage.py makemigrations
$ python manage.py migrate
# Create the superuser
$ python manage.py createsuperuser
# Start the application (development mode)
$ python manage.py runserver # default port 8000
- Access the
admin
section in the browser:http://127.0.0.1:8000/
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_log_reader-1.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26f10f54eace62964ccd04c3812e0125f7efde8e737791eee55cb5f13a807d7a |
|
MD5 | 960c83796243dca3057b3aef6ea9553a |
|
BLAKE2b-256 | 11477be4440589cabb6439315eebde84e7a30366ed533a5e757531f1ce27badb |