logdna / logdna-winston

LogDNA's Node.js logging module with support for Winston
MIT License
16 stars 14 forks source link

Quotes are not escaped in logs #16

Closed MikeKoval closed 5 years ago

MikeKoval commented 5 years ago

Hi!

Recently I downloaded logs from s3 bucket and tried to parse however it appeared that logdna does not escape quotes, so I'm not able to parse the json...

Here is an example

{"_source":{"_env":"production","_host":"bd0e308f-5f96-430a-9e6e-b605bab19b61","_logtype":"meta","_meta":{"res":{"statusCode":200},"req":{"url":"/sv-SE","method":"GET","httpVersion":"1.1","originalUrl":"/sv-SE"},"responseTime":610,"user":{},"headers":{"connection":"close","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0","accept":"*/*","accept-language":"fi-FI,fi;q=0.8,en-US;q=0.5,en;q=0.3","accept-encoding":"gzip, deflate, br","x-request-id":"9bfa5e38-3bed-4ae2-830a-7233b6e4dc4e","x-forwarded-for":"88.113.14.184","x-forwarded-proto":"https","x-forwarded-port":"443","via":"1.1 vegur","connect-time":"0","x-request-start":"1574061839893","total-route-time":"0"},"query":{}},"_tag":[],"_line":"HTTP GET /sv-SE 200 610ms","level":"info","_ts":1574061840747,","_ip":"10.233.101.141","_lid":"1149498674969100291"}}