inconshreveable / log15

Structured, composable logging for Go
https://godoc.org/github.com/inconshreveable/log15
Other
1.1k stars 145 forks source link

logfmt/json keys for msg/lvl/t are hard-coded #147

Closed neilisaac closed 6 years ago

neilisaac commented 6 years ago

Some logging services (ex. LogDNA) only parse specific key names to parse the log level and message. It would be nice if these were user configurable.

Proposed enhancement implemented in https://github.com/inconshreveable/log15/pull/145

ChrisHines commented 6 years ago

Have you considered writing a Handler that sets the KeyNames of each Record? I believe that this approach does not require any code changes in this package to achieve your goal.

neilisaac commented 6 years ago

Sounds like a good workaround, thanks @ChrisHines. Is this preferable over an interface change in the library?

ChrisHines commented 6 years ago

Yes, changing the interface would be a breaking change.