LogFlow is a modern, open-source error tracking and log management system for developers. It provides real-time error tracking, structured logging, and performance metrics to help you debug your applications effectively.
- Real-time Error Tracking: Capture and monitor errors with detailed stack traces
- Structured Logging: Collect and search through logs with powerful filtering
- Simple Integration: Easy to integrate with any application using lightweight SDKs or API
- Team Collaboration: Work together to resolve issues
- Performance Metrics: Track application performance
- Open Source: Free and community-driven
- Python 3.11 or higher
- PostgreSQL database (optional, defaults to SQLite)
- Clone the repository:
git clone https://github.com/yourusername/logflow.git
cd logflow- Install dependencies:
pip install -r requirements.txt- Set environment variables (optional):
export SECRET_KEY="your-secret-key"
export DATABASE_URL="postgresql://user:password@localhost/logflow"- Run the application:
python main.py- Build the Docker image:
docker build -t logflow .- Run the container:
docker run -p 5000:80 -e DATABASE_URL=postgresql://user:password@host/logflow -e SECRET_KEY=your-secret-key logflowimport requests
import json
API_KEY = 'your-project-api-key'
API_URL = 'https://your-logflow-instance.com/api/errors'
# Log an error
error_response = requests.post(
API_URL,
headers={
'Content-Type': 'application/json',
'X-API-Key': API_KEY
},
json={
'message': 'Failed to process payment',
'type': 'PaymentError',
'metadata': {
'order_id': 'ORD-12345',
'amount': 99.99
}
}
)import requests
API_KEY = 'your-project-api-key'
API_URL = 'https://your-logflow-instance.com/api/logs'
# Log a message
response = requests.post(
API_URL,
headers={
'Content-Type': 'application/json',
'X-API-Key': API_KEY
},
json={
'message': 'User logged in',
'level': 'INFO',
'metadata': {
'user_id': 123,
'role': 'admin'
}
}
)Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.