Logging
The Logging page provides real-time viewing of system logs, device communication logs, zone state changes, and client logs. It's the primary tool for troubleshooting and monitoring GEM in real-time.
Overview
Logging capabilities:
- System Logs: GEM server application logs
- Device Logs: Device driver communication
- Zone Logs: Zone state subscription monitoring
- Client Logs: Browser/client-side logs from remote devices
- Live Streaming: Real-time log updates
- Filtering: Search, severity levels, patterns
- Export: Save logs for analysis
Log Types
Select log type from dropdown:
System Log
Server application logs:
- Startup/shutdown events
- Errors and warnings
- Device connections/disconnections
- Macro executions
- Trigger activations
- Database operations
- Integration events
Severity Levels:
- ERROR: Critical errors requiring attention
- WARN: Warnings, potential issues
- INFO: Informational messages
- DEBUG: Detailed debugging info (development mode)
Device Log
Device driver communication logs:
- Commands sent to devices
- Responses received
- Connection events
- Communication errors
- Protocol-level debugging
Device Selection: Choose specific device to monitor
Zone Log
Zone state change monitoring:
- Power on/off events
- Level changes
- Attribute updates
- Real-time state subscription
Zone Selection: Choose specific zone to monitor
Client Log
Browser console logs from connected clients:
- JavaScript errors on client
- Client-side warnings
- UI rendering issues
- Client application logs
Client Selection: Choose connected client to monitor
Use Cases:
- Debug UI issues
- Monitor specific user's experience
- Troubleshoot browser-specific problems
Log Display
Log Format
Each log entry shows:
[HH:MM:SS] SEVERITY - Log message content
Example:
[14:32:15] INFO - device connected: living_room_receiver
[14:32:18] WARN - command timeout: bedroom_lights
[14:32:20] ERROR - macro execution failed: good_morning
Color Coding
- ERROR: Red background/text
- WARN: Yellow/orange background/text
- INFO: White/normal
- DEBUG: Gray/subdued
Auto-Scroll
Toggle to enable/disable:
- Enabled: Automatically scrolls to newest log entries
- Disabled: Manual scrolling (useful when reviewing specific entries)
Line Limit
Maximum lines displayed:
- Default: 1000 lines
- Older lines removed when limit reached
- Prevents memory issues on long monitoring sessions
Filtering and Search
Text Filter
Filter Input: Search for specific text
- Case-insensitive search
- Matches anywhere in log message
- Updates in real-time
Examples:
- Search "error" - shows only errors
- Search "bedroom" - shows bedroom-related logs
- Search "192.168" - shows logs with IP addresses
Exclude Filter
Exclude Input: Hide matching entries
- Opposite of filter
- Remove noise from logs
Examples:
- Exclude "polling" - hide routine polling messages
- Exclude "keepalive" - hide connection keepalives
Severity Filter
Log Level Dropdown:
- All: Show all severities
- ERROR: Only errors
- WARN: Warnings and errors
- INFO: Info, warnings, and errors
Regex Search
Advanced Search:
- Enable regex mode
- Use regular expressions for complex patterns
- Example:
(error|warn|fail)
Search Panel:
- Click to open advanced search
- Configure:
- Pattern (regex)
- Context before/after (lines)
- Max results
- Time range
- Results show matching entries with context
Since Dropdown (System Log - Production Mode)
When viewing System Logs in production mode, a Since dropdown filters log history:
- Real-time (live stream only)
- 5 minutes ago
- 15 minutes ago
- 30 minutes ago
- 1 hour ago
- 4 hours ago
- 8 hours ago
- 12 hours ago
- 1 day ago
- 2 days ago
- 1 week ago
This retrieves historical logs from the system journal. In development mode, only live console output is available.
Log Monitoring
Starting Monitoring
- Select log type (System, Device, Zone, Client)
- Select specific target if applicable (device, zone, client)
- Click Start or Connect
- Logs stream in real-time
Stopping Monitoring
- Click Stop or Disconnect
- Streaming stops
- Current logs remain visible
- Can be exported or cleared
Pausing
Pause Button:
- Stops display updates
- Logging continues in background
- Useful for reviewing specific entries
- Paused Count: Shows skipped entries
Resume:
- Click pause again
- Displays buffered entries
- Returns to real-time
Log Navigation
Severity Navigation
Jump to next error/warning:
Buttons:
- Next Error: Jump to next ERROR entry
- Next Warning: Jump to next WARN entry
- Next Info: Jump to next INFO entry
Keyboard Shortcuts (if implemented):
- E: Next error
- W: Next warning
- I: Next info
Severity Counts
Display shows:
- Error count (red badge)
- Warning count (yellow badge)
- Info count (blue badge)
Common Use Cases
Troubleshooting Device Issues
Monitor device communication:
- Select Device Log
- Select problematic device
- Start monitoring
- Send test command
- Review communication:
- Command sent
- Response received (or timeout)
- Errors logged
Debugging Macros
Monitor macro execution:
- Select System Log
- Filter: macro name
- Run macro
- Review execution steps:
- Macro started
- Each step execution
- Completion or error
- Step-by-step timing
Monitoring Zone State
Watch zone state changes:
- Select Zone Log
- Select zone
- Start monitoring
- Control zone from UI
- See real-time state updates
Client-Side Debugging
Troubleshoot UI issues:
- Select Client Log
- Select connected client (specific tablet/browser)
- Start monitoring
- User reproduces issue on their device
- Review client-side errors in real-time
Network Troubleshooting
Identify connectivity problems:
- Select System Log
- Filter: "disconnect" or "timeout"
- Review disconnection events
- Identify pattern (all devices, specific network, specific time)
Exporting Logs
Copy: Select text and copy to clipboard
Save: Use browser save/print to PDF
External Tools: Stream logs to external logging systems:
- Syslog
- Splunk
- ELK Stack
- CloudWatch
(Requires custom configuration)
Best Practices
-
Start Specific: Monitor specific device/zone rather than system-wide
-
Use Filters: Reduce noise with appropriate filters
-
Pause to Review: Pause when you see the issue to examine closely
-
Save Important Logs: Screenshot or export critical error sequences
-
Clear Between Tests: Clear logs between test runs for clarity
-
Note Timestamps: Correlate logs with user actions by time
-
Multiple Windows: Open multiple logging windows for correlation
Troubleshooting
No Logs Appearing
Check:
- Monitoring started (connected)
- Selected device/zone is active
- Network connection to GEM server
- Browser console for client-side errors
Too Much Noise
Solutions:
- Use exclude filter for routine messages
- Increase severity filter (ERROR only)
- Monitor specific device instead of system
- Disable debug logging (if enabled)
Logs Slow or Laggy
Causes:
- Too many log messages per second
- Browser struggling with updates
Solutions:
- Increase line limit (less frequent trimming)
- Disable auto-scroll
- Use filters to reduce volume
- Close other browser tabs
Cannot Find Specific Event
Techniques:
- Use search panel with time range
- Search for specific keywords
- Use regex for pattern matching
- Export logs and use external tool (grep, etc.)
Related Documentation
- Monitoring - Network and device monitoring
- Request History - Historical request log
- Device Health - Device uptime tracking