mendhak / docker-http-https-echo

Docker image that echoes request data as JSON; listens on HTTP/S, useful for debugging.
https://code.mendhak.com/docker-http-https-echo/
MIT License
621 stars 136 forks source link

JSON log as single line #50

Closed otherguy closed 1 year ago

otherguy commented 1 year ago

Hi and thank you for this image!

It would be great if the JSON in the log could be either disabled completely (just like the express logs) or configured to be printed compressed (as a single line) instead of pretty printed over multiple lines.

I have it running in an orchestrated environment and logs shipped to loggly, so a single line per request would be better.

bjw-s commented 1 year ago

Looks like printing as a single line is already possible with the LOG_WITHOUT_NEWLINE env variable: https://github.com/mendhak/docker-http-https-echo#no-newlines.

However, having the option to silence the console logging would be nice :)

otherguy commented 1 year ago

Oh :) Thank you @bjw-s, I completely missed that because it's not mentioned in the README on Dockerhub.

@mendhak in that case, I guess this is just a simple issue of updating the README over there :)