0

I am unable to disable INFO logs during testing.

Is there a way to do so?

Thanks.

agbaraka
  • 121
  • 1
  • 7

1 Answers1

1

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
dave
  • 62,300
  • 5
  • 72
  • 93