Sign inSign up

krrishnaaaa/log-collector

By krrishnaaaa

•Updated 9 months ago

Lightweight centralised logging service with real-time dashboard, REST API, and WebSocket streaming.

Image
Developer tools
0

1.3K

krrishnaaaa/log-collector repository overview

⁠Log Collector

A lightweight, self-hosted centralized logging service for collecting, storing, and viewing logs from multiple applications in real-time.

⁠Features

  • Real-time Dashboard - View logs as they arrive via WebSocket
  • REST API - Simple HTTP API for log ingestion and querying
  • Multi-service Support - Collect logs from multiple applications
  • Filtering - Filter by service, level, correlation ID, time range
  • Auto Cleanup - Configurable log retention with automatic cleanup
  • Lightweight - SQLite storage, minimal resource usage
  • Hardened - Distroless base image, non-root user, minimal attack surface

⁠Quick Start

docker run -d \
  --name log-collector \
  -p 7777:7777 \
  -v log-collector-data:/app/data \
  krrishnaaaa/log-collector:latest

Access dashboard: http://localhost:7777⁠

Configuration

┌──────────────────────┬───────────────────┬──────────────────────────┐
│ Environment Variable │      Default      │       Description        │
├──────────────────────┼───────────────────┼──────────────────────────┤
│ SERVER_PORT          │ 7777              │ Server port              │
├──────────────────────┼───────────────────┼──────────────────────────┤
│ DATABASE_PATH        │ /app/data/logs.db │ SQLite database path     │
├──────────────────────┼───────────────────┼──────────────────────────┤
│ LOG_RETENTION_HOURS  │ 24                │ Hours to retain logs     │
├──────────────────────┼───────────────────┼──────────────────────────┤
│ CLEANUP_ENABLED      │ true              │ Enable automatic cleanup │
└──────────────────────┴───────────────────┴──────────────────────────┘

Client Libraries

  • JavaScript/TypeScript: @pcsalt/log-collector-client
  • Kotlin/Java: com.pcsalt:log-collector-client

API Endpoints

  • POST /api/logs - Submit single log
  • POST /api/logs/batch - Submit multiple logs
  • GET /api/logs - Query logs with filters
  • GET /api/logs/services - List services
  • GET /actuator/health - Health check

Links

License

MIT License

⁠Categories/Tags

logging, log-management, log-collector, monitoring, observability, real-time, dashboard, rest-api, websocket, kotlin, spring-boot, sqlite, self-hosted, lightweight, distroless

Tag summary

Content type

Image

Digest

sha256:3ffa0e419…

Size

116 MB

Last updated

9 months ago

docker pull krrishnaaaa/log-collector