Skip to content

Instantly share code, notes, and snippets.

@geshan
Created March 14, 2021 04:29
Show Gist options
  • Save geshan/32201300b8a032962fe496d9e7c79ccc to your computer and use it in GitHub Desktop.
Save geshan/32201300b8a032962fe496d9e7c79ccc to your computer and use it in GitHub Desktop.
Markdium-5 Node.js Logging libraries compared for you to make the optimal choice
Example app listening at http://localhost:3003
{"level":30,"time":1611695678813,"pid":32768,"hostname":"abcd","req":{"id":1,"method":"GET","url":"/api/test","headers":{"host":"localhost:3003","connection":"keep-alive","sec-ch-ua":"\"Google Chrome\";v=\"87\", \" Not;A Brand\";v=\"99\", \"Chromium\";v=\"87\"","sec-ch-ua-mobile":"?0","upgrade-insecure-requests":"1","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","sec-fetch-site":"none","sec-fetch-mode":"navigate","sec-fetch-user":"?1","sec-fetch-dest":"document","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","cookie":"_ga=GA1.1.1863215728.1591927460; PPA_ID=gkq1qhp7htr141pkojpmqcqt95; webfx-tree-cookie-persistence=wfxt-4; io=TxK-RQvnHb14VONKAAAC","if-none-match":"W/\"19-JzA5ewGlTSyvFTwS4fIYMkAu78Q\""},"remoteAddress":"::1","remotePort":63824},"msg":"Yo from pino"}
{"level":30,"time":1611695678817,"pid":32768,"hostname":"abcd","req":{"id":1,"method":"GET","url":"/api/test","headers":{"host":"localhost:3003","connection":"keep-alive","sec-ch-ua":"\"Google Chrome\";v=\"87\", \" Not;A Brand\";v=\"99\", \"Chromium\";v=\"87\"","sec-ch-ua-mobile":"?0","upgrade-insecure-requests":"1","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","sec-fetch-site":"none","sec-fetch-mode":"navigate","sec-fetch-user":"?1","sec-fetch-dest":"document","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","cookie":"a=b","if-none-match":"W/\"19-JzA5ewGlTSyvFTwS4fIYMkAu78Q\""},"remoteAddress":"::1","remotePort":63824},"res":{"statusCode":304,"headers":{"x-powered-by":"Express","etag":"W/\"19-JzA5ewGlTSyvFTwS4fIYMkAu78Q\""}},"responseTime":4,"msg":"request completed"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment