MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / init

Function init

pkg/cluster/cluster_test.go:36–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34var ctx context.Context
35
36func init() {
37 logHandler, err := log.NewZap("console")
38 if err != nil {
39 panic(err)
40 }
41 logger := log.NewLogger(
42 logHandler,
43 log.WithLevel(log.DebugLevel),
44 )
45 ctx = log.NewContext(test.Context(), logger.WithField("namespace", "cluster"))
46 rpclog.ReplaceGrpcLogger(logger.WithField("namespace", "grpc"))
47}
48
49func TestCluster(t *testing.T) {
50 a := assertions.New(t)

Callers

nothing calls this directly

Calls 7

WithFieldMethod · 0.95
NewZapFunction · 0.92
NewLoggerFunction · 0.92
WithLevelFunction · 0.92
NewContextFunction · 0.92
ContextFunction · 0.92
ReplaceGrpcLoggerFunction · 0.92

Tested by

no test coverage detected