MCPcopy Create free account
hub / github.com/prometheus/common / TestDefaultConfig

Function TestDefaultConfig

promlog/log_test.go:26–32  ·  view source on GitHub ↗

Make sure creating and using a logger with an empty configuration doesn't result in a panic.

(t *testing.T)

Source from the content-addressed store, hash-verified

24// Make sure creating and using a logger with an empty configuration doesn't
25// result in a panic.
26func TestDefaultConfig(t *testing.T) {
27 logger := New(&Config{})
28
29 if err := logger.Log("hello", "world"); err != nil {
30 t.Fatal(err)
31 }
32}
33
34func TestUnmarshallLevel(t *testing.T) {
35 l := &AllowedLevel{}

Callers

nothing calls this directly

Calls 2

NewFunction · 0.70
LogMethod · 0.45

Tested by

no test coverage detected