MCPcopy
hub / github.com/grpc/grpc-go / output

Method output

grpclog/internal/loggerv2.go:127–140  ·  view source on GitHub ↗
(severity int, s string)

Source from the content-addressed store, hash-verified

125}
126
127func (g *loggerT) output(severity int, s string) {
128 sevStr := severityName[severity]
129 if !g.jsonFormat {
130 g.m[severity].Output(2, sevStr+": "+s)
131 return
132 }
133 // TODO: we can also include the logging component, but that needs more
134 // (API) changes.
135 b, _ := json.Marshal(map[string]string{
136 "severity": sevStr,
137 "message": s,
138 })
139 g.m[severity].Output(2, string(b))
140}
141
142func (g *loggerT) printf(severity int, format string, args ...any) {
143 // Note the discard check is duplicated in each print func, rather than in

Callers 6

printfMethod · 0.95
printMethod · 0.95
printlnMethod · 0.95

Calls 1

MarshalMethod · 0.65