turn off logging in golang code example Example: turn off logging in golang log.SetOutput(ioutil.Discard)