Example #1
0
func TestSet(t *testing.T) {
	nn1 := &log.NullLogger{}
	log.Set(nn1)
	defer func() {
		if r := recover(); r != nil {
			if es, ok := r.(error); ok {
				assert.EqualError(t, log.ErrLoggerSet, es.Error())
			} else {
				t.Error("Expected a cast to error interface")
			}
		}
	}()
	nn2 := &log.NullLogger{}
	log.Set(nn2)
}
Example #2
0
func init() {
	log.Set(
		log.NewStdLogger(),
	)
}
Example #3
0
func init() {
	log.Set(log.NewStdLogger())
	log.SetLevel(log.StdLevelDebug)
}
Example #4
0
func init() {
	log.Set(log.NewStdLogger(
		log.SetStdError(&errLogBuf, "testErr: ", std.Lshortfile),
	))
	log.SetLevel(log.StdLevelError)
}
Example #5
0
func init() {
	log.Set(log.NewStdLogger())
	log.SetLevel(log.StdLevelError)
}
Example #6
0
func init() {
	log.Set(log.NewStdLogger(
		log.SetStdError(&errLogBuf, "testErr", std.LstdFlags),
	))
}