in logger/common.go [495:523]
func (l *Logger) sendLogMsgToDest(
line []byte,
source string,
isPartialMsg, isLastPartial bool,
partialID string,
partialOrdinal int,
msgTimestamp time.Time,
) error {
if debug.Verbose {
debug.SendEventsToLog(l.Info.ContainerID,
fmt.Sprintf("[Pipe %s] Scanned message: %s", source, string(line)),
debug.DEBUG, 0)
}
message := newMessage(line, source, msgTimestamp)
if isPartialMsg {
message.PLogMetaData = &types.PartialLogMetaData{ID: partialID, Ordinal: partialOrdinal, Last: isLastPartial}
}
err := l.Log(message)
if err != nil {
// If we return a non-empty error here, it will cause the goroutine exits. As a result, it won't consume logs from stdout/stderr
// and the task container is unable to write logs to stdout/stderr and the application maybe blocked.
debug.SendEventsToLog(l.Info.ContainerID,
fmt.Sprintf("[Pipe %s] Failed to proxy msg to the log driver : %s", source, err),
debug.ERROR, 0)
}
return nil
}