Reputation: 121
I am unable to disable INFO logs during testing.
Is there a way to do so?
Thanks.
Upvotes: 0
Views: 231
Reputation: 64657
Set the buffalo.Options.Logger.Out
to ioutil.Discard
, you might have to create an instance of a logger to do it:
import (
"github.com/gobuffalo/logger"
"ioutil"
// etc.
)
var noopLogger logger.Logrus
noopLogger.Out = ioutil.Discard
noopLogger.SetOutput(ioutil.Discard) // can't remember which one you need to do
buffalo.Options.Logger = noopLogger
Upvotes: 1