Skip to content
This repository has been archived by the owner on Jul 15, 2018. It is now read-only.

[log] unsupported value type #18

Closed
ebuchman opened this issue May 21, 2017 · 6 comments
Closed

[log] unsupported value type #18

ebuchman opened this issue May 21, 2017 · 6 comments

Comments

@ebuchman
Copy link
Contributor

logging fails if we try to use a struct as a value

@melekes
Copy link
Contributor

melekes commented May 22, 2017

@adrianbrink
Copy link
Contributor

@ebuchman @melekes Can this be closed as it is not supported or are we going to implement this ourselves?

@ebuchman
Copy link
Contributor Author

ebuchman commented Jun 7, 2017

Hmmm ... We just need to make sure it's VERY WELL documented. Otherwise folks will be wasting time figuring out why they not getting log statements ...

@melekes
Copy link
Contributor

melekes commented Jun 14, 2017

See go-logfmt/logfmt#1 (comment)

@melekes
Copy link
Contributor

melekes commented Nov 6, 2017

Let's do this:

err := e.EncodeKeyval(k, v)
if err == logfmt.ErrUnsupportedValueType {
    e.EncodeKeyval(k, fmt.Sprintf("%+v", v))
}

@zramsay
Copy link
Contributor

zramsay commented Nov 8, 2017

#77

@zramsay zramsay closed this as completed Nov 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants