Disable gin debug logging on demand #299
Disable gin debug logging on demand #299
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dottorblaster I'm not sure if we need this.
gin-gonic
already has an internal Env variable for this GIN_MODE
.
Maybe, we should just document how to use it.
And we could set this variable to test
in our tests
Ref:
https://github.com/gin-gonic/gin/blob/master/mode.go#L15
@arbulu89 wow, I think you're right 😮 |
I actually have been testing, and I didn't make it work... I don't even know if this I just did the next: Add the next snippet in the
In the This makes the test output cleaner |
Ah yeah absolutely, it worked for me because I was doing this for testing purposes and with make test it worked seamlessly :) |
So, what are we going to do? I would be totally fine with what Xabi just suggested, and defer the integration with the |
@stefanotorresi @arbulu89 I like that, I'll update the PR accordingly, thank you so much! |
518310e
to
bfba591
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved with nitpick 😜
b7e8089
to
4ade917
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you rule! 🍻
Since Gin's debug logs in tests are super noisy to us,I thought that it would be a nice idea to change the behavior using a
TRENTO_DISABLE_GIN_DEBUG_LOG
env var :-)