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

Client logs should encode string in utf8 #5625

Closed
ritzalam opened this issue Jun 1, 2018 · 3 comments
Closed

Client logs should encode string in utf8 #5625

ritzalam opened this issue Jun 1, 2018 · 3 comments

Comments

@ritzalam
Copy link
Member

ritzalam commented Jun 1, 2018

Client logs are written in nginx logs in non-utf8 format which can't be parsed as JSON.

Here is an example log.

[2018-05-11T14:02:53+02:00] "2018/5/11 12:2:53.116 :: w_lh9npjbjsnhm 743c0f1fd0dcbc6e048cb7424fe077f42af48afd-1526038584041 :: [INFO] {"tags":["apps","connected"],"sessionToken":"ruo0v8hcr4vlaylo","waitForApproval":false,"user":{"externalMeetingId":"2f42f2eeb4583b3fc34e79fa855fc00160a1b89c-28-1","meetingId":"743c0f1fd0dcbc6e048cb7424fe077f42af48afd-1526038584041","meetingName":"\xD0\x92\xD0\xB5\xD0\xB1\xD0\xB8\xD0\xBD\xD0\xB0\xD1\x80 \xD0\xBF\xD0\xBE \xD0\x9F\xD1\x80\xD0\xB0\xD0\xB2\xD0\xB8\xD0\xBB\xD0\xB0\xD0\xBC \xD0\xB2\xD0\xB5\xD0\xB4\xD0\xB5\xD0\xBD\xD0\xB8\xD1\x8F \xD0\x9A\xD0\xB0\xD1\x81\xD1\x81\xD0\xBE\xD0\xB2...","username":"\xD0\x91\xD0\xBE\xD0\xBD\xD0\xB4\xD0\xB0\xD1\x80\xD0\xB5\xD0\xBD\xD0\xBA\xD0\xBE \xD0\x9D\xD0\xB0\xD1\x82\xD0\xB0\xD0\xBB\xD1\x8F","userId":"w_lh9npjbjsnhm"},"utcTime":1526040173116,"connections":{"screenshare":"","apps":"EEKRDFVX41EU0NM3","video":"","voice":""},"tzOffsetMin":-180,"tokenValid":true,"logCode":"validate_token_response_received"}"
@ritzalam ritzalam added this to the Release 2.0 milestone Jun 1, 2018
@kepstin
Copy link
Contributor

kepstin commented Jun 1, 2018

I believe this is some encoding added by nginx when saving to the log. When you parse the nginx log, you should reverse the escaping that nginx added before attempting to parse the json.
So, not really a bug, I think.

@ritzalam
Copy link
Member Author

ritzalam commented Jun 1, 2018

Says we can use escape=json but that available in nginx 1.11. We use 1.10.3

https://stackoverflow.com/questions/25049667/how-to-generate-a-json-log-from-nginx

@ritzalam
Copy link
Member Author

Closing as the decoding can be done on the log processors.

@ffdixon ffdixon removed this from the Release 2.0 milestone Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants