feat(server): add structured logging#25
Conversation
Signed-off-by: Francesco Ilario <filario@redhat.com>
Signed-off-by: Francesco Ilario <filario@redhat.com>
Signed-off-by: Francesco Ilario <filario@redhat.com>
sadlerap
left a comment
There was a problem hiding this comment.
A thought: we already use logr over in controller/, but we're moving to slog here. Long-term, I'd prefer us to use one logging framework and stick to it across everything.
Last I looked at the documentation, logr has support for slog as a backend (they export a struct that implements Handler), so maybe that's what we use long-term?
I'll do some more research into this on Monday; I want to see what kind of logging this produces (as compared to what log spits out).
Signed-off-by: Francesco Ilario <filario@redhat.com>
sadlerap
left a comment
There was a problem hiding this comment.
Alright, after playing around with slog a bit, I'm not opposed to using it. I rather like the API we get TBH. LGTM.
One follow-up question, however: do you know if we have any restrictions on an output format for our logs? I know in operators logs are usually in a JSON format, but I don't know if we have any requirement to do so here.
As of now, I don't know which is the format we'll need to use. I'd guess JSON format. |
No description provided.