Skip to content

Commit

Permalink
Reference ansible#1258: fix timestamp debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
aeter committed Jan 28, 2025
1 parent af3e477 commit 0cffbed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/workceptor/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,13 @@ func (kw *KubeUnit) KubeLoggingWithReconnect(streamWait *sync.WaitGroup, stdout
msg := line
timestamp := ParseTime(split[0])
if timestamp != nil {
kw.GetWorkceptor().nc.GetLogger().Debug("No timestamp received, log line: '%s'", line)
if !timestamp.After(sinceTime) && !successfulWrite {
continue
}
sinceTime = *timestamp
msg = split[1]
} else {
kw.GetWorkceptor().nc.GetLogger().Debug("No timestamp received, log line: '%s'", line)
}

_, err = stdout.Write([]byte(msg))
Expand Down

0 comments on commit 0cffbed

Please sign in to comment.