Sample Docker Container Structured JSON Log Stream
json
14 hours ago
·
28 lines
·
8 views
1[
2 {
3 "log": "{\"level\":\"info\",\"time\":1728461660124,\"pid\":1,\"hostname\":\"app-worker-1\",\"msg\":\"HTTP server listening on 0.0.0.0:3000\"}\n",
4 "stream": "stdout",
5 "time": "2026-10-09T08:14:20.124892015Z"
6 },
7 {
8 "log": "{\"level\":\"info\",\"time\":1728461661200,\"pid\":1,\"hostname\":\"app-worker-1\",\"msg\":\"Database connection pool established (max: 20)\"}\n",
9 "stream": "stdout",
10 "time": "2026-10-09T08:14:21.200142981Z"
11 },
12 {
13 "log": "{\"level\":\"warn\",\"time\":1728461665402,\"pid\":1,\"hostname\":\"app-worker-1\",\"msg\":\"Redis cache connection dropped. Initiating backoff retry (attempt 1/5)\"}\n",
14 "stream": "stderr",
15 "time": "2026-10-09T08:14:25.402774120Z"
16 },
17 {
18 "log": "{\"level\":\"info\",\"time\":1728461666100,\"pid\":1,\"hostname\":\"app-worker-1\",\"msg\":\"Redis connection restored successfully\"}\n",
19 "stream": "stdout",
20 "time": "2026-10-09T08:14:26.100982441Z"
21 },
22 {
23 "log": "{\"level\":\"error\",\"time\":1728461670850,\"pid\":1,\"hostname\":\"app-worker-1\",\"err\":{\"type\":\"ValidationError\",\"message\":\"Note title must not exceed 255 characters\"},\"msg\":\"Request validation failed\"}\n",
24 "stream": "stderr",
25 "time": "2026-10-09T08:14:30.850419202Z"
26 }
27]
[
{
"log": "{\"level\":\"info\",\"time\":1728461660124,\"pid\":1,\"hostname\":\"app-worker-1\",\"msg\":\"HTTP server listening on 0.0.0.0:3000\"}\n",
"stream": "stdout",
"time": "2026-10-09T08:14:20.124892015Z"
},
{
"log": "{\"level\":\"info\",\"time\":1728461661200,\"pid\":1,\"hostname\":\"app-worker-1\",\"msg\":\"Database connection pool established (max: 20)\"}\n",
"stream": "stdout",
"time": "2026-10-09T08:14:21.200142981Z"
},
{
"log": "{\"level\":\"warn\",\"time\":1728461665402,\"pid\":1,\"hostname\":\"app-worker-1\",\"msg\":\"Redis cache connection dropped. Initiating backoff retry (attempt 1/5)\"}\n",
"stream": "stderr",
"time": "2026-10-09T08:14:25.402774120Z"
},
{
"log": "{\"level\":\"info\",\"time\":1728461666100,\"pid\":1,\"hostname\":\"app-worker-1\",\"msg\":\"Redis connection restored successfully\"}\n",
"stream": "stdout",
"time": "2026-10-09T08:14:26.100982441Z"
},
{
"log": "{\"level\":\"error\",\"time\":1728461670850,\"pid\":1,\"hostname\":\"app-worker-1\",\"err\":{\"type\":\"ValidationError\",\"message\":\"Note title must not exceed 255 characters\"},\"msg\":\"Request validation failed\"}\n",
"stream": "stderr",
"time": "2026-10-09T08:14:30.850419202Z"
}
]
Replies 0
No replies yet
Every reply is a note. Start a discussion, ask a question, or attach a code snippet.
Notification