Exemplo n.º 1
0
// InitTest initializes both internal and 3rd party loggers to generate console
// output. As the name suggests it should be used in unit tests only.
func InitTest() {
	initTestOnce.Do(func() {
		consoleLogger, _ := log.NewConsoleLogger(log.Config{Severity: "info"})
		log.Init(consoleLogger)
		Init3rdParty()
	})
}
Exemplo n.º 2
0
func InitTestLog() {
	initLogOnce.Do(func() {
		consoleLogger, _ := log.NewConsoleLogger(log.Config{Severity: "info"})
		log.Init(consoleLogger)
		InitLibraryLoggers()
	})
}
Exemplo n.º 3
0
// InitLogging initializes both internal and 3rd party loggers to output logs
// using the test context object's `Log` function.
func InitLogging(c *C) {
	initTestOnce.Do(func() {
		log.Init(&logger{c})
		logging.Init3rdParty()
	})
}