Inspiration
Application and system logs contain valuable information about what is happening inside a software system, but large volumes of logs can be difficult to analyze manually. Important errors may be buried among thousands of routine messages.
SafeLog AI was built to make log analysis faster and more accessible by automatically classifying log messages using machine learning. The idea is to help developers and small teams identify important events without having to manually inspect every log entry.
What it does
SafeLog AI takes application log messages as input and predicts their category automatically. Instead of manually going through large amounts of raw log data, users can send logs to the system and receive an automated classification.
The system uses natural-language embeddings to convert log messages into meaningful numerical representations and a machine-learning classifier to predict the appropriate category.
How we built it
The project was developed using:
- Python
- FastAPI
- REST APIs
- Sentence Transformers
- Logistic Regression
- Machine Learning
FastAPI provides the REST API layer, while Sentence Transformers are used to generate semantic representations of log messages. A Logistic Regression model then uses these representations to classify the logs.
Why it matters
For organizations with limited technical resources, manually monitoring application logs can be time-consuming. Automating the first level of log classification can help users identify errors and important events more quickly.
SafeLog AI focuses on making this process simple: provide a log, receive a classification, and use the result to decide which events need further attention.
Challenges
One of the main challenges was converting unstructured log messages into representations that a machine-learning model could understand effectively. Different logs can express similar events using very different wording.
Choosing an appropriate text representation and combining it with a lightweight classifier was an important part of the development process.
Another challenge was designing the system as an API so that the classification model could be accessed programmatically rather than only through a local script.
What I learned
Through this project, I learned how to combine natural-language processing with traditional machine learning and expose the resulting model through a REST API.
I also gained practical experience in preparing text data, generating embeddings, training a classifier, and integrating a machine-learning model into an application.
Future Improvements
Future versions could include:
- Real-time log monitoring
- Severity detection
- Suspicious-event detection
- A visual monitoring dashboard
- Support for uploading complete log files
- Multilingual explanations of detected issues
- More advanced anomaly-detection models
SafeLog AI is a step toward making automated log analysis easier to use for teams that do not have dedicated monitoring infrastructure.
Built With
- api
- artificial
- fastapi
- language
- learning
- logistic
- machine
- natural
- processing
- python
- regression
- rest
- sentence
- transformers
Log in or sign up for Devpost to join the conversation.