Worker: Blender command, don't put current time in log lines

The time has to be put in at a different abstraction level.
This commit is contained in:
Sybren A. Stüvel 2022-02-22 15:36:20 +01:00
parent adf7113b34
commit a650aa4cbd

View File

@ -93,14 +93,7 @@ func (ce *CommandExecutor) cmdBlenderRender(ctx context.Context, logger zerolog.
}
logger.Debug().Msg(line)
timestamp := ce.timeService.Now().Format(timeFormat)
// %35s because trailing zeroes in the nanoseconds aren't output by the
// formatted timestamp, and thus it has a variable length. Using a fixed
// width in this Sprintf() call ensures the rest of the line aligns visually
// with the preceeding ones.
logLine := fmt.Sprintf("%35s: pid=%d > %s", timestamp, blenderPID, line)
logChunker.Append(ctx, logLine)
logChunker.Append(ctx, fmt.Sprintf("pid=%d > %s", blenderPID, line))
}
logChunker.Flush(ctx)