signalk-logviewer
v0.3.1
Published
SignalK Plugin to view and filter server logs
Maintainers
Readme
Signal K Log Viewer
The motivation for this simple Webapp log viewer is that Sever -> Server Log is often cluttered and not searchable. Acts like "tail -n xxxx" and you can "grep" in the output. Victron VenusOS see below.
Requirements
- SignalK 2.15 or higher
- Systemd logging or Victron Cerbo GX (tested v3.66 and v3.70-beta)
Features
- Get up to 50000 last lines from log, 2000 lines by default
- Filter log
- Copy to clipboard
- Timestamp format options:
- Original: Shows timestamps as they appear in the log file (default for TAI64N on Cerbo)
- ISO 8601: Converts TAI64N timestamps to ISO 8601 format (e.g., 2025-01-15T10:30:45.123Z)
- Locale: Converts timestamps to your browser's local time format
- Cerbo GX permission warning: Automatic detection and guidance for Venus OS users
Victron Venus OS (Cerbo GX / Octo GX / Venus GX)
- Issue #1 The log directory
/data/log/signalk-serveris owned by root:root, but the plugin runs as signalk:signalk, so it needs permission to access the log files. - Issue #2 Also the 25kb limit for the log file are way too small.
- The following has been successfully tested on VenusOS 3.66:
Quick Fix (temporary - resets on reboot)
- SSH into your device as root
- Execute:
chown -R signalk:signalk /data/log/signalk-serverPersistent Solution (survives reboot)
- SSH into your device as root
- Create
/data/rc.localfile:
cat > /data/rc.local << 'EOF'
#!/bin/sh
# Fix SignalK log permissions
chown -R signalk:signalk /data/log/signalk-server
EOF- Make it executable:
chmod +x /data/rc.local- Reboot your device:
rebootIncrease LOG size, default is only 25kb
- SSH into your device as root
- Backup original file
cp /opt/victronenergy/service/signalk-server/log/run /data/run.backup- Edit
/opt/victronenergy/service/signalk-server/log/runfile:
cat > /opt/victronenergy/service/signalk-server/log/run << 'EOF'
#!/bin/sh
exec 2>&1
exec multilog t s2500000 n4 /var/log/signalk-server
EOF- Reboot your device:
rebootNote: The plugin automatically detects Venus OS devices (Cerbo GX, Octo GX, Venus GX) and displays an error message with these instructions if logs cannot be accessed.
Changelog
Bug reports
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
