Real-time, cross-platform log monitoring and analysis tool with comprehensive OS log collection
- Cross-Platform OS Log Collection: Windows Event Logs, macOS Unified Logs, Linux journalctl & syslog
- Security Log Support: Dedicated security log collection and querying
- Multi-threaded Architecture: Optimized for i7-13400HX (12 cores, 16 threads) with 8 worker threads
- Intelligent Checkpointing: Incremental log tailing with position tracking
- SQLite Storage: Raw JDBC implementation (no ORM, no Spring, no GUI)
- Robust Parser: Normalizes logs from all platforms into unified schema
- Real-time CLI: Interactive command-line interface with 10 commands
- Java JDK 11+
- Administrator/root privileges (for full log access)
Windows:
cd Build
build.bat
cd ..\run
run.batmacOS/Linux:
cd Build
./build.sh
cd ../run
./run.shcollect-system # Collect all OS logs from detected sources
recent # Show last 20 log entries
filter <INFO|WARN|ERROR> # Filter logs by level
filter-security # Show security logs only
stats # Display log statistics
sources # List detected log sources
search <keyword> # Search logs by keyword
verbose # Toggle verbose mode
help # Show help
exit # Graceful shutdownββββββββββββββββββββββββββββββββββββββββββββββββββ
β LogPulse v1.0 β
β Real-time Log Monitoring & Analysis β
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Running on: Windows 10 10.0
Database initialized successfully.
Initialized LogIngestionManager with 8 worker threads
Starting 8 log writer threads...
β Log ingestion system active
LogPulse> collect-system
ββββββββββββββββββββββββββββββββββββββββββββββββββ
β Starting System Log Collection β
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Detected OS: Windows
β Collecting Windows Event Logs...
β’ Collecting: System
β Collected 200 events from System
β’ Collecting: Application
β Collected 200 events from Application
β’ Collecting: Security
β Collected 200 events from Security
β Collection completed in 15.23 seconds
LogPulse> stats
ββββββββββββββββββββββββββββββββββββββββββββββββββ
β Log Statistics β
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Total Logs: 1543
INFO: 1234 (80.0%)
WARN: 245 (15.9%)
ERROR: 64 (4.1%)
- OSLogCollector: Multi-platform log source detection and collection
- LogIngestionManager: Multi-threaded processing with BlockingQueue (10k capacity)
- DatabaseHandler: Raw JDBC SQLite operations
- LogParser: Multi-pattern parser supporting 5+ log formats
- ConsoleInterface: Interactive CLI with command routing
- Main Thread: CLI and user input
- 8 Worker Threads: Concurrent database writes
- Temporary Collection Threads: OS command execution
logs table:
CREATE TABLE logs (
id INTEGER PRIMARY KEY AUTOINCREMENT,
timestamp TEXT NOT NULL,
level TEXT,
source TEXT,
message TEXT NOT NULL
);security_logs table:
CREATE TABLE security_logs (
id INTEGER PRIMARY KEY AUTOINCREMENT,
timestamp TEXT NOT NULL,
event_type TEXT,
source TEXT,
message TEXT NOT NULL
);log_checkpoints table:
CREATE TABLE log_checkpoints (
source TEXT PRIMARY KEY,
last_position TEXT NOT NULL
);- System, Application, Security Event Logs (
wevtutil) - PowerShell Operational logs
C:\Windows\System32\LogFiles\C:\ProgramData\directories- Windows Error Reporting (WER)
- Unified logging (
log show --style syslog) /var/log/*.logfiles- Apple System Log (ASL) if available
- journalctl logs (systemd)
/var/log/syslog,/var/log/auth.log,/var/log/kern.log- Generic
/var/log/*.logfiles
- Throughput: 1,000-5,000 events/second
- Collection Time: 30-120 seconds (full system scan)
- Memory Usage: 100-300 MB
- CPU Optimization: Scales with cores (8+ recommended)
Logpulse/
βββ bin/ # Compiled classes
βββ Build/ # Build scripts
βββ lib/ # SQLite JDBC driver
βββ run/ # Run scripts
βββ src/main/java/com/logpulse/
β βββ Main.java
β βββ collector/ # OS log collection
β βββ console/ # CLI interface
β βββ database/ # SQLite operations
β βββ model/ # Data models
β βββ parser/ # Log parsing
β βββ worker/ # Multi-threaded ingestion
βββ LOGPULSE_GUIDE.md # Comprehensive guide
See LOGPULSE_GUIDE.md for comprehensive documentation including:
- Detailed architecture
- Parser implementation
- Checkpoint system
- Security considerations
- Troubleshooting guide
- Development instructions
Windows: Run as Administrator for Security Event Log access
macOS: Use sudo for unified logging and /var/log access
Linux: Use sudo or root for journalctl and protected log files
All data stored locally in logpulse.db - no network transmission.
- Language: Java 11+
- Database: SQLite 3.51.1 (via JDBC)
- Architecture: Multi-threaded with ExecutorService
- Dependencies: SQLite JDBC driver only (no frameworks)
See LICENSE file for details.
This is a comprehensive system log collector designed for Windows, macOS, and Linux. Contributions welcome!
LogPulse - Comprehensive OS Log Collection & Analysis Tool