codegangsta / gin

Live reload utility for Go web servers
MIT License
4.23k stars 317 forks source link

Underlying server process is no longer connected to a TTY when launched by gin #137

Open alexflint opened 6 years ago

alexflint commented 6 years ago

When running as a gin subprocess, the stdout pipe for the underlying server process is no longer connected to a TTY. This can affect things such as formatting choices made by logging frameworks like logrus.

I'm guessing that the reason for this is that gin is creating a pipe and manually copying things over to the "outer" output stream. If gin instead explicitly transferred ownership of its own stdout and stderr pipes to the subprocess then the subprocess would see them as TTYs.