- 🚀 Real-time log streaming and visualization
- 🔍 Advanced log filtering and search capabilities
- 📊 Interactive dashboard with metrics
- 🔐 Configurable logging levels and formats
- 🐳 Docker-ready deployment
- ⚡ Built with Next.js and Go for high performance
The application is composed of a Go backend and a Next.js frontend. The backend consists of two services:
log-generator: A service that generates logs at a configurable rate and format.log-collector: A service that collects logs from thelog-generatorand exposes them to the frontend.centrifugo: A real-time messaging server that streams logs to the frontend.
The frontend is a Next.js application that provides a web interface for viewing and filtering logs.
- Node.js 18+
- Go 1.21+
- Docker (optional)
-
Start the logger service:
cd src/services/generator go run main.go -
Start the collector service:
cd src/services/collector go run main.go -
Launch the web interface:
cd client pnpm install pnpm run dev -
Access the web interface at
http://localhost:3000
docker compose up -d| Environment Variable | Description | Default |
|---|---|---|
LOG_RATE |
The number of logs to generate per second | 10 |
CONSOLE_OUTPUT |
Whether to output logs to the console | true |
OUTPUT_FILE |
The file to output logs to | /var/log/logger/service.log |
LOG_FORMAT |
The format of the logs (json, text) | json |
ENABLE_BURSTS |
Whether to enable log bursts | true |
BURST_FREQUENCY |
The frequency of log bursts | 0.1 |
BURST_MULTIPLIER |
The multiplier for the log rate during bursts | 5 |
BURST_DURATION |
The duration of log bursts in seconds | 3 |
| Environment Variable | Description | Default |
|---|---|---|
CONFIG_PATH |
The path to the configuration file | /app/config.yml |
| Environment Variable | Description | Default |
|---|---|---|
NEXT_PUBLIC_GENERATOR_API_URL |
The URL of the log-generator service |
http://localhost:8080 |
NEXT_PUBLIC_COLLECTOR_API_URL |
The URL of the log-collector service |
http://localhost:8081 |
NEXT_PUBLIC_WS_URL |
The URL of the Centrifugo WebSocket server | ws://localhost:8000/connection/websocket |
PORT |
Web interface port | 3000 |
GET /config: Get the current configuration of thelog-generatorservice.POST /config: Update the configuration of thelog-generatorservice.GET /logs: Get the latest logs from thelog-generatorservice.GET /statistics: Get statistics about the logs generated by thelog-generatorservice.
GET /conn/:id: Authenticate a client to connect to the Centrifugo server.GET /sub/:id: Authenticate a client to subscribe to a channel on the Centrifugo server.