From ee17c233451cbe1a78eb1c4d3e399eb44c8e3275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?rich=CE=9Brd?= Date: Fri, 18 Aug 2023 23:18:42 -0400 Subject: [PATCH] fix: log output and encoding (#656) --- cmd/waku/node.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/waku/node.go b/cmd/waku/node.go index 805c1999..36b0782e 100644 --- a/cmd/waku/node.go +++ b/cmd/waku/node.go @@ -83,6 +83,10 @@ const dialTimeout = 7 * time.Second // Execute starts a go-waku node with settings determined by the Options parameter func Execute(options NodeOptions) { + // Set encoding for logs (console, json, ...) + // Note that libp2p reads the encoding from GOLOG_LOG_FMT env var. + utils.InitLogger(options.LogEncoding, options.LogOutput) + hostAddr, err := net.ResolveTCPAddr("tcp", fmt.Sprintf("%s:%d", options.Address, options.Port)) failOnErr(err, "invalid host address")