open-feature / go-sdk

Go SDK for OpenFeature
https://openfeature.dev
Apache License 2.0
126 stars 30 forks source link

[FEATURE] Move to log/slog logging #260

Open cndoit18 opened 5 months ago

cndoit18 commented 5 months ago

Requirements

Now that structured logging has landed in the standard library, we can shed an external dependency and just use log/slog.

Kavindu-Dodan commented 5 months ago

@cndoit18 thank you for bringing this up. Currently, we use logr [1], and once we upgrade our Go version to 1.21, we could consider migrating/using the standard logger.

I will create a follow-up issue for 1.21 upgrade once we merge #255 [2]

[1] - https://github.com/open-feature/go-sdk?tab=readme-ov-file#logging [2] - https://github.com/open-feature/go-sdk/pull/255

Kavindu-Dodan commented 5 months ago

Added breaking change tag as adoption of slog will break backward compatibility for older go versions. When implementing, we should consider interoperability with logr [1] and see if there're any API changes.

[1] - https://github.com/go-logr/logr?tab=readme-ov-file#slog-interoperability