Keep supervised log entries verbatim

This commit is contained in:
npc0-hue
2026-09-02 12:22:41 +08:00
parent 386a295f20
commit 8de49f2dd3
5 changed files with 5 additions and 11 deletions
+2 -4
View File
@@ -1404,7 +1404,6 @@ func checksumForLogEntries(entries []protocol.LogEntry) (string, error) {
Level: entry.Level,
Line: entry.Line,
Fields: entry.Fields,
Redacted: entry.Redacted,
}
}
encoded, err := json.Marshal(stable)
@@ -1421,7 +1420,6 @@ type logEntryChecksumBody struct {
Level string `json:"level,omitempty"`
Line string `json:"line"`
Fields map[string]string `json:"fields,omitempty"`
Redacted bool `json:"redacted"`
}
func (worker *Worker) capacityReport() protocol.RunCapacityReport {
@@ -1524,7 +1522,7 @@ func (sink *LiveLogSink) append(assignment protocol.RunJobAssignment, stream str
FirstSeq: sequence,
LastSeq: sequence,
Compression: "none",
Entries: []protocol.LogEntry{{Seq: sequence, Timestamp: time.Now().UTC(), Level: "info", Line: line, Redacted: false}},
Entries: []protocol.LogEntry{{Seq: sequence, Timestamp: time.Now().UTC(), Level: "info", Line: line}},
}
batch.Checksum, _ = checksumForLogEntries(batch.Entries)
select {
@@ -1576,7 +1574,7 @@ func (sink *SpoolLogSink) append(ctx context.Context, assignment protocol.RunJob
defer sink.mu.Unlock()
streamKey := declaredProcessStreamKey(assignment, stream)
logStreamID := logStreamIDForAssignment(assignment, streamKey)
entry := protocol.LogEntry{Timestamp: time.Now().UTC(), Level: "info", Line: line, Redacted: false}
entry := protocol.LogEntry{Timestamp: time.Now().UTC(), Level: "info", Line: line}
source := "process"
if strings.HasPrefix(stream, "management-program.") {
source = "management-program"