MCPcopy Index your code
hub / github.com/rilldata/rill / zapLevelToPBLevel

Function zapLevelToPBLevel

runtime/pkg/logutil/handler.go:65–80  ·  view source on GitHub ↗
(level zapcore.Level)

Source from the content-addressed store, hash-verified

63}
64
65func zapLevelToPBLevel(level zapcore.Level) runtimev1.LogLevel {
66 switch level {
67 case zapcore.DebugLevel:
68 return runtimev1.LogLevel_LOG_LEVEL_DEBUG
69 case zapcore.InfoLevel:
70 return runtimev1.LogLevel_LOG_LEVEL_INFO
71 case zapcore.WarnLevel:
72 return runtimev1.LogLevel_LOG_LEVEL_WARN
73 case zapcore.ErrorLevel:
74 return runtimev1.LogLevel_LOG_LEVEL_ERROR
75 case zapcore.DPanicLevel, zapcore.PanicLevel, zapcore.FatalLevel:
76 return runtimev1.LogLevel_LOG_LEVEL_FATAL
77 default:
78 return runtimev1.LogLevel_LOG_LEVEL_UNSPECIFIED
79 }
80}

Callers 1

WriteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected