ignore health checks in logs
This commit is contained in:
parent
e7f5e8a636
commit
c224dd25a9
|
|
@ -677,6 +677,8 @@ async function runApp(dir: string, port: number) {
|
||||||
const chunk = decoder.decode(value)
|
const chunk = decoder.decode(value)
|
||||||
const lines = chunk.split('\n').map(l => l.trimEnd()).filter(Boolean)
|
const lines = chunk.split('\n').map(l => l.trimEnd()).filter(Boolean)
|
||||||
for (const text of lines) {
|
for (const text of lines) {
|
||||||
|
// Skip health check logs (e.g., "200 GET http://localhost:3001/ok (0ms)")
|
||||||
|
if (/\bGET\b.*\/ok\b/.test(text)) continue
|
||||||
info(app, text)
|
info(app, text)
|
||||||
writeLogLine(dir, streamType, text)
|
writeLogLine(dir, streamType, text)
|
||||||
app.logs = (app.logs ?? []).slice(-MAX_LOGS)
|
app.logs = (app.logs ?? []).slice(-MAX_LOGS)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user