in logger/buffered_logger.go [176:202]
func (bl *bufferedLogger) saveSingleLogMessageToRingBuffer(
line []byte,
source string,
isFirstPartial, isPartialMsg bool,
partialTimestamp time.Time,
) (error, time.Time, bool, bool) {
msgTimestamp, partialTimestamp, isFirstPartial, isPartialMsg := getLogTimestamp(
isFirstPartial,
isPartialMsg,
partialTimestamp,
bl.containerID,
)
if debug.Verbose {
debug.SendEventsToLog(bl.containerID,
fmt.Sprintf("[Pipe %s] Scanned message: %s", source, string(line)),
debug.DEBUG, 0)
}
message := newMessage(line, source, msgTimestamp)
err := bl.buffer.Enqueue(message)
if err != nil {
err := errors.Wrap(err, "failed to save logs to buffer")
return err, partialTimestamp, isFirstPartial, isPartialMsg
}
return nil, partialTimestamp, isFirstPartial, isPartialMsg
}