Get up and running with PyLoPi in 5 minutes! ⚡
- Python 3.8 or higher
- pip (Python package manager)
- A modern web browser
Linux/Mac:
git clone https://github.com/PicoBaz/PyLoPi.git
cd PyLoPi
chmod +x run.sh
./run.shWindows:
git clone https://github.com/PicoBaz/PyLoPi.git
cd PyLoPi
run.batgit clone https://github.com/PicoBaz/PyLoPi.git
cd PyLoPi
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
python app.pygit clone https://github.com/PicoBaz/PyLoPi.git
cd PyLoPi
docker-compose up -dOpen your browser and go to:
http://localhost:5000
- Look for the "Start Monitoring" section
- Enter the path to your log file (e.g.,
/var/log/app.log) - Click "Add Log Path"
- Add more paths if needed
Click the "Start Monitoring" button. PyLoPi will begin analyzing your logs in real-time!
Want to see PyLoPi in action without real logs? Generate test data:
python test_log_generator.py test.log 20 2This creates a test log file with 20 sample errors (2 seconds apart).
Then add test.log to PyLoPi and watch it analyze!
import logging
logging.basicConfig(
filename='app.log',
level=logging.ERROR,
format='%(asctime)s - %(levelname)s - %(message)s'
)
try:
result = 10 / 0
except Exception as e:
logging.error(f"Error occurred: {e}")Add app.log to PyLoPi to monitor this application.
Apache:
ErrorLog /var/log/apache2/error.logNginx:
error_log /var/log/nginx/error.log;Add these paths to PyLoPi.
/var/log/app1/error.log
/var/log/app2/error.log
/home/user/project/debug.logAdd all paths you want to monitor!
- Click "Settings" tab
- Enable "Email Notifications"
- Enter your email address
- Configure SMTP settings:
- Server:
smtp.gmail.com - Port:
587 - Username: Your Gmail address
- Password: Your Gmail app password
- Server:
- Click "Save Settings"
For Gmail, you need to:
- Enable 2-factor authentication
- Generate an app password: https://myaccount.google.com/apppasswords
- Use the app password in PyLoPi settings
Only want specific errors? Configure filters:
- Go to Settings
- Scroll to "Enabled Error Types"
- Check only the errors you want to monitor
- Click "Save Settings"
Example: Monitor only SyntaxError and TypeError
When an error is detected:
- It appears on the Dashboard
- Click "View Details" for full analysis
- See:
- Error explanation
- Suggested solutions
- Code fixes (when applicable)
- Full log context
Uncheck low-priority error types in Settings
Configure email notifications for instant alerts
Use the EN/FA buttons in the header
Dashboard updates every 5 seconds automatically
Check the dashboard for:
- Total logs count
- Today's errors
- Critical error count
- Top error types
Edit app.py and change the port:
app.run(debug=True, host='0.0.0.0', port=5001)- Check file path is correct
- Verify file permissions
- Ensure file exists
- Try absolute path instead of relative
- Check SMTP settings
- Verify Gmail app password
- Check spam folder
- Try port 465 instead of 587
Delete pylopi.db and restart:
rm pylopi.db
python app.py- 📖 Read the full documentation
- 🔧 Explore configuration options
- 🤝 Contribute to the project
- ⭐ Star the repository on GitHub
- 💬 Ask questions: Telegram
- 📧 Email: picobaz3@gmail.com
Ready to dive deeper? Check out the complete documentation!
Happy monitoring! 🚀