From 287ef19530bb34d3c60fccf176da8a51990c598a Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Tue, 8 Oct 2024 12:01:35 +0000 Subject: [PATCH] fix: pass container by pointer to allow changing logs --- container/container.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/container/container.go b/container/container.go index c0e1dd7..de57cd7 100644 --- a/container/container.go +++ b/container/container.go @@ -466,7 +466,7 @@ func (c Container) build(imagePath string) (output string, err error) { return } -func (c Container) Run(workdir string, cmds []string) (out string, err error) { +func (c *Container) Run(workdir string, cmds []string) (out string, err error) { flog := c.Log.With(). Str("workdir", workdir). Str("command", fmt.Sprintf("%v", cmds)). @@ -535,7 +535,7 @@ func (c Container) Run(workdir string, cmds []string) (out string, err error) { } c.handleCommandsOutput(m) out += m + "\n" - flog.Trace().Str("stdout", m).Msg("") + flog.Trace().Str("container stdout", m).Msg("") } }()