go – Why tty=true(in docker-compose.yml) makes log highlights on Gin app?

go – Why tty=true(in docker-compose.yml) makes log highlights on Gin app?

This is solved by comment.

DavidMaze: Code can tell whether stdout is a tty or not, and make decisions about coloration accordingly. In log files you often dont want the color escape codes, which can make the files harder to read.

Me: Im not sure that I understand your comment especially the subject in the first sentence. Does Code means code of terminal?

DavidMaze: In this case I mean the logging library Gin is using. You can call a function (Google quickly finds me this library) and tell whether stdout is a terminal or a file or a pipe or something else.

go – Why tty=true(in docker-compose.yml) makes log highlights on Gin app?

Related posts

Leave a Reply

Your email address will not be published.