A modern web-based log viewer for Busl streaming servers. View logs in real-time with syntax highlighting, search, and download capabilities.
- 🚀 Real-time log streaming via Server-Sent Events (SSE)
- 🎨 Syntax highlighting for log levels (ERROR, WARN, INFO, SUCCESS)
- 💾 Download logs as text files
- 🔍 Auto-detection of log levels
- 📱 Responsive design for mobile and desktop
- 🔄 Auto-reconnect on connection loss
- 🕒 Timestamps for each log entry
- 🗑️ Clear logs functionality
- 💾 Remembers server URL preference
- Open
index.htmlin a web browser - Enter your Busl server URL (e.g.,
http://localhost:5001) - Enter a stream ID
- Click "Connect"
You can link directly to a stream:
file:///path/to/index.html?stream=your-stream-id
# Using Python
python3 -m http.server 8080
# Using Node.js
npx http-server -p 8080
# Using nginx
server {
listen 80;
server_name logs.example.com;
root /var/www/log-viewer;
index index.html;
}- Push to a GitHub repository
- Enable GitHub Pages
- Access at
https://username.github.io/repo-name/?stream=your-stream-id
FROM nginx:alpine
COPY index.html /usr/share/nginx/html/
EXPOSE 80The viewer stores preferences in localStorage:
busl-server: Last used server URL
Enterin stream ID field: ConnectCtrl/Cmd + K: Clear logs (when focused)
<iframe
src="https://logs.yourcompany.com/?stream=build-123"
width="100%"
height="600"
frameborder="0">
</iframe>[View Build Logs](https://logs.yourcompany.com/?stream=build-${BUILD_ID})Create a bookmarklet to quickly open logs:
javascript:(function(){
const streamId = prompt('Enter stream ID:');
if(streamId) window.open('https://logs.yourcompany.com/?stream=' + streamId);
})();Edit the CSS variables in the <style> section:
/* Dark theme colors */
body {
background: #0d1117;
color: #c9d1d9;
}
/* Log level colors */
.log-entry.error { color: #f85149; }
.log-entry.warning { color: #d29922; }
.log-entry.info { color: #58a6ff; }
.log-entry.success { color: #3fb950; }The viewer is a single HTML file for easy customization:
- Add search functionality
- Implement log filtering
- Add export to JSON
- Create custom themes
- The viewer connects directly to your Busl server
- No data is sent to external services
- Supports HTTPS connections
- Basic auth is handled by the browser
- Chrome/Edge: Full support
- Firefox: Full support
- Safari: Full support (iOS 11+)
- Internet Explorer: Not supported
- Verify the Busl server is running
- Check for CORS headers on the server
- Ensure the stream ID exists
- Try using the server IP instead of hostname
- The viewer keeps the last 10,000 log entries
- Older entries are automatically removed
- Download logs before they're rotated out
MIT License - see LICENSE file for details