opsgenie / opsgenie-go-sdk-v2

Opsgenie GO SDK v2
Apache License 2.0
34 stars 63 forks source link

Ability to disable logging #86

Open stack72 opened 3 years ago

stack72 commented 3 years ago

Hi,

right now, due to:

func printInfoLog(client *OpsGenieClient) {Eren Kızılay, 3 years ago: • design change
    client.Config.Logger.Infof("Client is configured with ApiUrl: %s, LogLevel: %s, RetryMaxCount: %v",
        client.Config.OpsGenieAPIURL,
        client.Config.Logger.GetLevel().String(),
        client.RetryableClient.RetryMax)
}

any client connection gets logged - this can be very verbose in downstream user logs]

this is what we see in all pulumi runs

Previewing update (test):
     Type                 Name       Plan     Info
     pulumi:pulumi:Stack  test                1 message

Diagnostics:
  pulumi:pulumi:Stack (test):
    INFO[2021-07-13T16:52:34.811336306+01:00] Client is configured with ApiUrl: api.opsgenie.com, LogLevel: info, RetryMaxCount: 10

Paul

DiogoMCampos commented 1 year ago

Just raising this again, it would be great to have a way to disable logging.

As a user of the SDK, I don't expect it to log anything at all, just return the response and/or errors and leave it up to me to decide what to do with them.