MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / TestStandardLogger

Function TestStandardLogger

utils/log/logwrapper_test.go:32–82  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30}
31
32func TestStandardLogger(t *testing.T) {
33 SetLevel(DebugLevel)
34 if GetLevel() != DebugLevel {
35 t.Fail()
36 }
37 Debug("Debug")
38 Debugln("Debugln")
39 Debugf("Debugf %d", 1)
40 Print("Print")
41 Println("Println")
42 Printf("Printf %d", 1)
43 Info("Info")
44 Infoln("Infoln")
45 Infof("Infof %d", 1)
46 Warning("Warning")
47 Warningln("Warningln")
48 Warningf("Warningf %d", 1)
49 Warn("Warn")
50 Warnln("Warnln")
51 Warnln("Warnln")
52 Warnf("Warnf %d", 1)
53 Error("Error")
54 Errorln("Errorln")
55 Errorf("Errorf %d", 1)
56 defer func() {
57 if r := recover(); r != nil {
58 fmt.Println("Recovered in f", r)
59 }
60 defer func() {
61 if r := recover(); r != nil {
62 fmt.Println("Recovered in f", r)
63 }
64 defer func() {
65 if r := recover(); r != nil {
66 fmt.Println("Recovered in f", r)
67 }
68 n := NilFormatter{}
69 a, b := n.Format(&logrus.Entry{})
70 if a != nil || b != nil {
71 t.Fail()
72 }
73 }()
74 Panicf("Panicf %d", 1)
75 }()
76 Panicln("Panicln")
77
78 }()
79
80 Panic("Panic")
81
82}
83
84func call0() {
85 call1()

Callers

nothing calls this directly

Calls 15

FormatMethod · 0.95
SetLevelFunction · 0.85
GetLevelFunction · 0.85
DebugFunction · 0.85
DebuglnFunction · 0.85
DebugfFunction · 0.85
PrintFunction · 0.85
PrintlnFunction · 0.85
PrintfFunction · 0.85
InfoFunction · 0.85
InfolnFunction · 0.85
InfofFunction · 0.85

Tested by

no test coverage detected