示例#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)
}
示例#2
0
文件: main.go 项目: hafeez3000/csfw
func init() {
	log.Set(
		log.NewStdLogger(),
	)
}
示例#3
0
func init() {
	log.Set(log.NewStdLogger())
	log.SetLevel(log.StdLevelDebug)
}
示例#4
0
func init() {
	log.Set(log.NewStdLogger(
		log.SetStdError(&errLogBuf, "testErr: ", std.Lshortfile),
	))
	log.SetLevel(log.StdLevelError)
}
示例#5
0
func init() {
	log.Set(log.NewStdLogger())
	log.SetLevel(log.StdLevelError)
}
示例#6
0
func init() {
	log.Set(log.NewStdLogger(
		log.SetStdError(&errLogBuf, "testErr", std.LstdFlags),
	))
}