fix: Remove EnableECPLogging logic in client (#69)
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.
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 @@
"errors"
"fmt"
"io"
- "log"
"net/rpc"
"os"
"os/exec"
@@ -53,17 +52,6 @@
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 @@
//
// The config file also specifies which certificate the signer should use.
func Cred(configFilePath string) (*Key, error) {
- enableECPLogging()
if configFilePath == "" {
configFilePath = util.GetDefaultConfigFilePath()
}