diff options
author | Andy Zhao <andyzhao@google.com> | 2023-02-13 11:14:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 11:14:58 -0800 |
commit | d0957a96ce28f68cd21ce2742c06237f3fa93fbe (patch) | |
tree | ee5eb12f0e621e11b758debe5f8c571c0f796071 | |
parent | e26f9fc7784a1af854cc5673d8491051469287de (diff) | |
download | googleapis-enterprise-certificate-proxy-d0957a96ce28f68cd21ce2742c06237f3fa93fbe.tar.gz |
fix: Remove EnableECPLogging logic in client (#69)upstream/v0.2.3
Having this logic in the client is suppressing global logging outside of ECP for users of google-api-go-client, since this gets triggered during transport layer initialization.
-rw-r--r-- | client/client.go | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/client/client.go b/client/client.go index 7a34c0f..b3283b8 100644 --- a/client/client.go +++ b/client/client.go @@ -25,7 +25,6 @@ import ( "errors" "fmt" "io" - "log" "net/rpc" "os" "os/exec" @@ -53,17 +52,6 @@ func (c *Connection) Close() error { return werr } -// If ECP Logging is enabled return true -// Otherwise return false -func enableECPLogging() bool { - if os.Getenv("ENABLE_ENTERPRISE_CERTIFICATE_LOGS") != "" { - return true - } - - log.SetOutput(io.Discard) - return false -} - func init() { gob.Register(crypto.SHA256) gob.Register(&rsa.PSSOptions{}) @@ -131,7 +119,6 @@ var ErrCredUnavailable = errors.New("Cred is unavailable") // // The config file also specifies which certificate the signer should use. func Cred(configFilePath string) (*Key, error) { - enableECPLogging() if configFilePath == "" { configFilePath = util.GetDefaultConfigFilePath() } |