From 09d0876b6cfb4c6a57a01cefd3878051c224da5e Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Mon, 30 Mar 2020 13:50:58 -0400 Subject: [PATCH] command: remove unused logOutput field --- command/agent/agent.go | 3 --- command/connect/proxy/proxy.go | 8 ++------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/command/agent/agent.go b/command/agent/agent.go index 52bc538147..f1df46ad22 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -3,7 +3,6 @@ package agent import ( "flag" "fmt" - "io" "os" "os/signal" "path/filepath" @@ -59,7 +58,6 @@ type cmd struct { versionHuman string shutdownCh <-chan struct{} flagArgs config.Flags - logOutput io.Writer logger hclog.InterceptLogger } @@ -205,7 +203,6 @@ func (c *cmd) run(args []string) int { if !ok { return 1 } - c.logOutput = logOutput c.logger = logger diff --git a/command/connect/proxy/proxy.go b/command/connect/proxy/proxy.go index 013f9d38fa..0d74a3f9a2 100644 --- a/command/connect/proxy/proxy.go +++ b/command/connect/proxy/proxy.go @@ -3,7 +3,6 @@ package proxy import ( "flag" "fmt" - "io" "log" "net" "net/http" @@ -43,8 +42,7 @@ type cmd struct { shutdownCh <-chan struct{} - logOutput io.Writer - logger hclog.Logger + logger hclog.Logger // flags logLevel string @@ -138,12 +136,10 @@ func (c *cmd) Run(args []string) int { Name: logging.Proxy, LogJSON: c.logJSON, } - logger, logGate, logOutput, ok := logging.Setup(logConfig, c.UI) + logger, logGate, _, ok := logging.Setup(logConfig, c.UI) if !ok { return 1 } - c.logOutput = logOutput - c.logger = logger // Enable Pprof if needed