From a650aa4cbdbb2acc0e993aba6ad202742fcb5563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 22 Feb 2022 15:36:20 +0100 Subject: [PATCH] Worker: Blender command, don't put current time in log lines The time has to be put in at a different abstraction level. --- internal/worker/command_blender.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/internal/worker/command_blender.go b/internal/worker/command_blender.go index 02683a29..afe04572 100644 --- a/internal/worker/command_blender.go +++ b/internal/worker/command_blender.go @@ -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)