You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many of the log statements have a semi-structured format with key=value substrings. It is useful operationally to have distinct key-values for downstream loggers like elasticsearch, logstash,etc.
I propose we swap out the Go std logger for an interface like:
And use one of those libraries to handle the logging. Both work well. The former has simplest possible interface, the latter a little bit more structure, but both essentially transmit the same information.
I also personally much prefer to not share a global logging instance and pass it down the stack through options, but I appreciate it is a matter of taste. I think we could optionally set it on the factory and have it passed down from there.
Will submit PR if you agree.
The text was updated successfully, but these errors were encountered:
Let's try Logger from go-kit - it looks very simple. I guess we don't need to pull whole go-kit just for the interface and can copy paste only interface with the reference to go-kit somewhere.
Many of the log statements have a semi-structured format with
key=value
substrings. It is useful operationally to have distinct key-values for downstream loggers like elasticsearch, logstash,etc.I propose we swap out the Go std logger for an interface like:
https://github.com/go-kit/kit/blob/master/log/log.go#L11
or
https://github.com/inconshreveable/log15/blob/master/handler.go#L19
And use one of those libraries to handle the logging. Both work well. The former has simplest possible interface, the latter a little bit more structure, but both essentially transmit the same information.
I also personally much prefer to not share a global logging instance and pass it down the stack through options, but I appreciate it is a matter of taste. I think we could optionally set it on the factory and have it passed down from there.
Will submit PR if you agree.
The text was updated successfully, but these errors were encountered: