open-feature / ofep

A focal point for OpenFeature research, proposals and requests for comments
https://openfeature.dev
20 stars 15 forks source link

Logging configuration #29

Closed toddbaert closed 2 years ago

toddbaert commented 2 years ago

We may want to define a standard logging interface that could be supplied as an optional argument to the client creation function, which could wrap standard logging functionality of the implementation language (or whatever the Application Author wants to use).

agentgonzo commented 2 years ago

It'll certainly be nicer than directly using its own logger, which just happens to be a different one from the logger that the caller is using.... which happens all the time 😆

toddbaert commented 2 years ago

It'll certainly be nicer than directly using its own logger, which just happens to be a different one from the logger that the caller is using.... which happens all the time laughing

Yep, and it's always irritating :rage:.

Using it's own logger, or just writing to console could always be a fallback to one being un-supplied.

toddbaert commented 2 years ago

We should also give providers access to the logger somehow, I think. The can use it in provider logic, but also, pass it to whatever SDK they might be wrapping, if that's supported.

moredip commented 2 years ago

An intentionally provocative idea - what if we didn't specify any logging support at all, and relied on otel integration for this capability?

Or, less provocatively, could we implement logging entirely in userland via hooks?

toddbaert commented 2 years ago

An intentionally provocative idea - what if we didn't specify any logging support at all, and relied on otel integration for this capability?

Or, less provocatively, could we implement logging entirely in userland via hooks?

Point one is provocative indeed, not sure yet how I feel about that.

I'm interested in the second point as well, it might be enough, but does that get us all the logging we need? What if there's a desire to log something IN a provider, or in the basic flag evaluation life-cycle outside a hook?

toddbaert commented 2 years ago

An OFEP for this would be good, eventually.

beeme1mr commented 2 years ago

I'm going to move this to the research repo.

toddbaert commented 2 years ago

We've decided that logging is enough of an orthogonal concern that we will not outline it in the spec.

It will be up to SDKs to implement logging in a language-idiomatic way, keeping in mind the applicable design principles.