launchdarkly / go-server-sdk

LaunchDarkly Server-side SDK for Go
Other
39 stars 17 forks source link

Logging With Zap Logger #160

Open reesmanp opened 6 days ago

reesmanp commented 6 days ago

Zap is a popular logging library for golang which I am currently using. However, the logging interface launch darkly uses is at odds with zap and I cannot utilize the same logger I am using for the rest of the application with launch darkly. I think it would be ideal to support zap here.

cwaldren-ld commented 5 days ago

Hi @reesmanp , can you explain a bit more about what difficulty you are encountering - specifically?

Is there some reason Zap cannot be used with the BaseLoggers interface?

reesmanp commented 5 days ago

@cwaldren-ld thanks for responding. There are two main issues. One is easy enough to add a wrapper around and implement myself, that is the f functions (Debugf, Errorf, etc). The real issue is that the non-f functions have the requirement of:

Debug(values ...interface{})

where as zap has:

Debug(msg string, fields ...Field)