From f5e491325f1e9d8030d546601d617f511b13a99c Mon Sep 17 00:00:00 2001 From: mountain Date: Thu, 22 Aug 2024 15:53:53 +0900 Subject: [PATCH] =?UTF-8?q?logwirter=EC=88=98=EC=A0=95=20-=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EA=B3=BC=20stdout=20=EB=8F=99=EC=8B=9C=EC=97=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/operation.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/operation.go b/client/operation.go index addd1ff..97abd23 100644 --- a/client/operation.go +++ b/client/operation.go @@ -322,6 +322,7 @@ func (hc *houstonClient) launch(meta *procmeta) error { logWriter = func(buff []byte) { for written := 0; written < len(buff); { + os.Stdout.Write(buff) n, err := targetFile.Write(buff) if err != nil { logger.Println("write log file failed :", logfilePath, err) @@ -333,6 +334,9 @@ func (hc *houstonClient) launch(meta *procmeta) error { } } else { logger.Println("failed to create log file :", logfilePath, err) + logWriter = func(buff []byte) { + os.Stdout.Write(buff) + } } } else { logWriter = func(buff []byte) {