Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

klogr flatten logs some strings oddly #139

Closed
benmoss opened this issue Apr 14, 2020 · 2 comments · Fixed by #140
Closed

klogr flatten logs some strings oddly #139

benmoss opened this issue Apr 14, 2020 · 2 comments · Fixed by #140
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@benmoss
Copy link
Member

benmoss commented Apr 14, 2020

/kind bug

What steps did you take and what happened:
Had a klogr log something with > in the string, and saw it come out as u003e

What did you expect to happen:
Just prints the > character

Anything else you would like to add:
https://play.golang.org/p/xoZ7_N1tkUw

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 14, 2020
@neolit123
Copy link
Member

@k8s-ci-robot
Copy link

@neolit123:
This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

it's because of this:
https://github.com/kubernetes/klog/blob/master/klogr/klogr.go#L142

and it needs the following fix:
https://stackoverflow.com/questions/28595664/how-to-stop-json-marshal-from-escaping-and

/help
/priority backlog

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added priority/backlog Higher priority than priority/awaiting-more-evidence. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants