MCPcopy
hub / github.com/uber-go/zap / String

Method String

zapcore/level.go:113–132  ·  zapcore/level.go::Level.String

String returns a lower-case ASCII representation of the log level.

()

Source from the content-addressed store, hash-verified

111
112// String returns a lower-case ASCII representation of the log level.
113func (l Level) String() string {
114 switch l {
115 case DebugLevel:
116 return "debug"
117 case InfoLevel:
118 return "info"
119 case WarnLevel:
120 return "warn"
121 case ErrorLevel:
122 return "error"
123 case DPanicLevel:
124 return "dpanic"
125 case PanicLevel:
126 return "panic"
127 case FatalLevel:
128 return "fatal"
129 default:
130 return fmt.Sprintf("Level(%d)", l)
131 }
132}
133
134// CapitalString returns an all-caps ASCII representation of the log level.
135func (l Level) CapitalString() string {

Callers 15

MarshalTextMethod · 0.95
TestLevelNilsFunction · 0.95
EncodeEntryMethod · 0.45
TestJSONEncodeEntryFunction · 0.45
TestJSONEmptyConfigFunction · 0.45
TestEntryCallerFunction · 0.45
TestLevelOfSamplerFunction · 0.45
TestSamplerUnknownLevelsFunction · 0.45
LowercaseLevelEncoderFunction · 0.45
StringDurationEncoderFunction · 0.45

Calls

no outgoing calls

Tested by 15

TestLevelNilsFunction · 0.76
TestJSONEncodeEntryFunction · 0.36
TestJSONEmptyConfigFunction · 0.36
TestEntryCallerFunction · 0.36
TestLevelOfSamplerFunction · 0.36
TestSamplerUnknownLevelsFunction · 0.36
assertJSONFunction · 0.36
assertOutputFunction · 0.36
TestConsoleEncodeEntryFunction · 0.36
TestConsoleSeparatorFunction · 0.36