Skip to content

Commit

Permalink
fix: Remove EnableECPLogging logic in client (#69)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
andyrzhao committed Feb 13, 2023
1 parent e26f9fc commit d0957a9
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"errors"
"fmt"
"io"
"log"
"net/rpc"
"os"
"os/exec"
Expand Down Expand Up @@ -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{})
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit d0957a9

Please sign in to comment.