MCPcopy Create free account
hub / github.com/coder/slog / Named

Method Named

slog.go:138–141  ·  view source on GitHub ↗

Named appends the name to the set names on the logger.

(name string)

Source from the content-addressed store, hash-verified

136// Named appends the name to the set names
137// on the logger.
138func (l Logger) Named(name string) Logger {
139 l.names = appendNames(l.names, name)
140 return l
141}
142
143// Leveled returns a Logger that only logs entries
144// equal to or above the given level.

Callers 7

StdlibFunction · 0.80
TestLoggerFunction · 0.80
ExampleLogger_NamedFunction · 0.80
TestMakeFunction · 0.80
TestNoDriverValueFunction · 0.80
TestStackdriverFunction · 0.80
TestVisualFunction · 0.80

Calls 1

appendNamesFunction · 0.85

Tested by 6

TestLoggerFunction · 0.64
ExampleLogger_NamedFunction · 0.64
TestMakeFunction · 0.64
TestNoDriverValueFunction · 0.64
TestStackdriverFunction · 0.64
TestVisualFunction · 0.64