Logging
The edge controller provides configurable logging to help you monitor its operation and troubleshoot issues.
Log output configuration
The FOXGLOVE_LOG_OUTPUT environment variable controls where the edge controller writes its logs. Three output modes are available:
| Mode | Output destination | Best for |
|---|---|---|
journald | System journal (systemd) | Production deployments with systemd |
json | JSON-formatted logs to stderr | Log aggregation and automated parsing |
text | Human-readable logs to stderr | Development and manual troubleshooting |
Without FOXGLOVE_LOG_OUTPUT, the edge controller writes JSON logs to stderr. The installation guide's environment templates configure journald for the Debian package, and text for the standalone executable and Docker. The Kubernetes chart uses the default.
Viewing logs
How you access edge controller logs depends on your installation method and log output configuration.
- Debian package
- Statically linked Linux executable
- Docker image
- Kubernetes
The edge controller writes structured log entries to the system journal. View logs with journalctl:
# View recent logs
journalctl -u foxglove-edge-controller
# Follow logs in real-time
journalctl -u foxglove-edge-controller -f
To export the binary journal (for example, to provide to Foxglove support):
journalctl -u foxglove-edge-controller --since "1 hour ago" -o export > foxglove-edge-controller.journal
If you run the edge controller under systemd with FOXGLOVE_LOG_OUTPUT=journald, view logs with journalctl, replacing <unit-name> with your service's unit name:
# View recent logs
journalctl -u <unit-name>
# Follow logs in real-time
journalctl -u <unit-name> -f
To export the binary journal (for example, to provide to Foxglove support):
journalctl -u <unit-name> --since "1 hour ago" -o export > foxglove-edge-controller.journal
Otherwise, logs are written to stderr based on your FOXGLOVE_LOG_OUTPUT setting.
Logs are written to stderr. Use docker logs to view them:
# View recent logs
docker logs foxglove-edge-controller
# Follow logs in real-time
docker logs -f foxglove-edge-controller
Logs are written to stderr. Use kubectl logs to view them:
# View recent logs
kubectl logs -n foxglove statefulset/site-controller
# Follow logs in real-time
kubectl logs -n foxglove statefulset/site-controller -f
Log levels
The edge controller uses the following log levels, from least to most verbose:
- error: Critical errors that require attention
- warn: Warnings about potential issues or degraded operation
- info: General informational messages about edge controller activity (default)
- debug: Detailed diagnostic information for troubleshooting
Enabling debug logging
Set the FOXGLOVE_LOG environment variable to enable debug logging:
FOXGLOVE_LOG=info,edge_controller=debug,recording_store=debug
This configuration sets the log level to debug for the edge controller and its recording catalog, but retains a default log level of info for its other library dependencies.
Debug logging may be useful for:
- Investigating recording discovery and cataloging issues
- Troubleshooting upload problems
- Providing detailed logs when reporting issues to Foxglove support
Don't leave debug logging enabled continuously in production environments, as it can:
- Generate large log volumes
- Make it harder to identify important messages
- Impact performance in high-throughput scenarios
Enable debug logging temporarily when investigating specific issues, then return to the default log level.