Tuesday, March 14, 2023
HomeGolangDisable log in golang gin - Technical Dialogue

Disable log in golang gin – Technical Dialogue


We want to disable log in golang gin mission.

We don’t need to present any panic or log messages.


If you don’t want a log in, then don’t implement a log in… Unsure how that is associated to printing panics although…

Do this:
gin.SetMode(gin.ReleaseMode)
gin.DefaultWriter = io.Discard

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments