log.go raw
1 package cmds
2
3 import (
4 "github.com/p9c/p9/pkg/log"
5
6 "github.com/p9c/p9/version"
7 )
8
9 var subsystem = log.AddLoggerSubsystem(version.PathBase)
10 var F, E, W, I, D, T log.LevelPrinter = log.GetLogPrinterSet(subsystem)
11
12 func init() {
13 // to filter out this package, uncomment the following
14 // var _ = logg.AddFilteredSubsystem(subsystem)
15
16 // to highlight this package, uncomment the following
17 // var _ = logg.AddHighlightedSubsystem(subsystem)
18
19 // these are here to test whether they are working
20 // F.Ln("F.Ln")
21 // E.Ln("E.Ln")
22 // W.Ln("W.Ln")
23 // I.Ln("I.Ln")
24 // D.Ln("D.Ln")
25 // F.Ln("T.Ln")
26 // F.F("%s", "F.F")
27 // E.F("%s", "E.F")
28 // W.F("%s", "W.F")
29 // I.F("%s", "I.F")
30 // D.F("%s", "D.F")
31 // T.F("%s", "T.F")
32 // F.C(func() string { return "F.C" })
33 // E.C(func() string { return "E.C" })
34 // W.C(func() string { return "W.C" })
35 // I.C(func() string { return "I.C" })
36 // D.C(func() string { return "D.C" })
37 // T.C(func() string { return "T.C" })
38 // F.C(func() string { return "F.C" })
39 // E.Chk(errors.New("E.Chk"))
40 // W.Chk(errors.New("W.Chk"))
41 // I.Chk(errors.New("I.Chk"))
42 // D.Chk(errors.New("D.Chk"))
43 // T.Chk(errors.New("T.Chk"))
44 }
45