EzLogs
"A Logs analyser for developers build on top of elasticsearch"
Open Source Programs ☀ :
Tech Stack 🚀 :
-
- Django
-
- Django Rest Framework
-
- React
-
- Elastic Search
-
- Celery & Redis
Docker Setup:
docker-compose up --build
Local Setup 👨💻:
elastic search on our machine, Follow this guide
NOTE : You need to first setup1.Virtual Environment Setup :
For Linux :
$. python3 -m venv env
$. source env/bin/activate
For Windows :
$. py -m venv env
$. env\Scripts\activate
2. Installing Dependencies:
$. pip install wheel
$. pip install -r requirements.txt
3. Create Database Tables and Superuser:
Note: For Windows Users Replace python3 with python
$. python3 manage.py makemigrations
$. python3 manage.py migrate
$. python3 manage.py createsuperuser
4. Install Redis and Start Server
$. sudo apt-get install redis-server
$. sudo service redis-server start
[Options: {start|stop|restart|force-reload|status}]
For Windows Users :
Refer This Article : https://dev.to/divshekhar/how-to-install-redis-on-windows-10-3e99
5. Running Celery
$. celery -A core worker -l INFO
For Windows Users :
https://stackoverflow.com/questions/37255548/how-to-run-celery-on-windows
6. Run Server
$. python3 manage.py runserver
8. Run Frontend
cd frontend/
npm i
npm run start
9. Go Live :
- Now goto http://localhost:3000/ to test and run ezLogger.
API Endpoints :
- http://localhost:8000/api/document/ (For Uploading New Log File, METHOD = GET/POST)
- http://localhost:8000/api/get-some-log-lines/<FILE_ID>/ (For getting first 'N' lines from recent uploaded log, METHOD = GET)
- http://localhost:8000/api/search/?q=<SEARCH_QUERY>&file_id=<File_ID> (For getting search result based upon user search query, METHOD = GET/POST)
Want To Contribute ? 🙋
here
See Ideas List✨ CONTRIBUTORS ✨
Working Screenshots 🕵 :
sample-log.log
:
Search Results
sample-log.log
:
Sample log file
Contributing Guidelines :
- Create a branch with feature/bug-fix name.
git branch <branch-name>
git checkout <branch-name>
- Shorthand for creating a branch and checkout to the branch
git checkout -b <branch-name>
- After making the changes, run these commands.
git add . # To add all files to the staging area.
git add <file-name> # To add specific file to the staging area.
git commit -m "commit message"
git push # While running for the first time, you'll encounter an error. Run the suggested command given by git cli.