Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Okhlopkov <[email protected]>
  • Loading branch information
Pavel Okhlopkov committed Oct 25, 2024
1 parent c31a625 commit 9fbc545
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkg/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,19 @@ func (pj *proxyJSONLogger) Write(p []byte) (int, error) {

logLine := string(logLineRaw)

logEntry := pj.WithField(app.ProxyJsonLogKey, true)

if len(logLine) > 10000 {
logLine = fmt.Sprintf("%s:truncated", string(logLine[:10000]))
}

truncetedLog, _ := json.Marshal(map[string]string{
"truncated": logLine,
})
truncatedLog, _ := json.Marshal(map[string]string{
"truncated": logLine,
})

logEntry := pj.WithField(app.ProxyJsonLogKey, true)
logEntry.Log(log.FatalLevel, string(truncatedLog))
}

logEntry.Log(log.FatalLevel, string(truncetedLog))
logEntry.Log(log.FatalLevel, string(logLine))

return len(p), nil
}
Expand Down

0 comments on commit 9fbc545

Please sign in to comment.