Closed ogimenezb closed 3 years ago
By design indeed.
Because we found some software cannot handle ' in nested json. So we escape it in advance.
Ok, will try not to use contractions.
I have just got and error, external no mine with a contraction ' .
Could we add an option not to escape? if not then, well, that's life... lol
I curious that what "error" you got, by right "\u0027" is valid format for the json string.
Yes, is a valid json string. Sometimes just to be quick I open log on VSCode or Notepad ar whatever editor I have available and reed ir directly.
I suppose ideally I would create a simple app to see logs.
Sorry, one las question. Do you now any good parser / viewer, preferably in html for json log?
in terminal, I usually use jq
to query/view log, for example
cat info.log | jq -r '[time, level, msg] | @csv'
for large amount log files, I usually import to a external database (e.g. Clickhouse, but I know someone use ELK instead) the query/view them with SQL
Given the following example:
I have the following outputs: Console:
{"time":"2021-06-12T18:10:42.379+02:00","level":"info","caller":"main.go:233","goid":1,"message":"can\u0027t handle single quotation mark"}
Pretty:2021-06-12T18:10:42.379+02:00 INF 1 main.go:234 > can't handle single quotation mark
File:{"time":"2021-06-12T18:10:42.379+02:00","level":"info","caller":"main.go:235","goid":1,"message":"can\u0027t handle single quotation mark"}
It seems it can\u0027t handle it correctly... lol