All S4E On-Prem services emit structured JSON logs to stdout, which Docker captures. This guide covers how to access, filter, and interpret those logs.
Accessing Logs
View Logs for a Specific Service
# Last 50 lines
docker logs s4e-core-1 --tail 50
# Follow in real time
docker logs s4e-core-1 -f
# Last 1 hour
docker logs s4e-core-1 --since 1h
# Since a specific time
docker logs s4e-core-1 --since "2026-04-24T10:00:00"
View Logs for All Services at Once
Filter Logs by Level
Since logs are JSON, use grep or jq:
# Only errors
docker logs s4e-core-1 2>&1 | grep '"levelname": "ERROR"'
# Pretty-print with jq
docker logs s4e-core-1 2>&1 | jq 'select(.levelname == "ERROR")'
# Errors and warnings
docker logs s4e-core-1 2>&1 | jq 'select(.levelname | IN("ERROR","WARNING"))'
Log Format
All services emit structured JSON logs. Each line is a single JSON object:
{
"asctime": "[24/Apr/2026:14:12:39 +0000]",
"levelname": "INFO",
"filename": "base_task.py",
"lineno": 75,
"message": "Task started",
"task_key": "tasks.onprem.db-sync.action_catalog",
"job_log_id": "2142",
"category": "task",
"event": "task_started",
"duration_seconds": "0.138",
"session_id": "a3f1c2d4-7e89-4b0f-95a6-2c8d3e1f4b72"
}
Key Fields
| Field | Description |
|---|---|
asctime |
Timestamp of the log entry |
levelname |
Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL |
filename |
Source file name |
message |
Human-readable description |
task_key |
Task identifier (scheduler tasks) |
category |
Functional area (e.g., task, integration, scheduler) |
event |
Specific event name (e.g., task_started, task_failed) |
duration_seconds |
How long the operation took |
integration_service |
External service name for integration logs |
integration_status |
HTTP status code for integration calls |
Adjusting Log Levels
To enable more verbose logging for a specific service, set LOG_LEVEL=DEBUG in .env and restart the service:
# Edit .env
nano /opt/s4e/setup/.env
# Add: LOG_LEVEL=DEBUG
# Restart the specific service
docker compose up -d --no-deps core
DEBUG in production
DEBUG logging produces very high log volume and may expose sensitive data. Only enable for active troubleshooting. Revert to INFO when done.
Next Steps
- Common errors — solutions for specific error messages.
- Recovery procedures — backup and restore.