mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to opentelemetry support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
56
vendor/google.golang.org/grpc/internal/channelz/logging.go
generated
vendored
56
vendor/google.golang.org/grpc/internal/channelz/logging.go
generated
vendored
@ -21,80 +21,82 @@ package channelz
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"google.golang.org/grpc/internal/grpclog"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
)
|
||||
|
||||
// Info logs through grpclog.Info and adds a trace event if channelz is on.
|
||||
func Info(id int64, args ...interface{}) {
|
||||
var logger = grpclog.Component("channelz")
|
||||
|
||||
// Info logs and adds a trace event if channelz is on.
|
||||
func Info(l grpclog.DepthLoggerV2, id int64, args ...interface{}) {
|
||||
if IsOn() {
|
||||
AddTraceEvent(id, 1, &TraceEventDesc{
|
||||
AddTraceEvent(l, id, 1, &TraceEventDesc{
|
||||
Desc: fmt.Sprint(args...),
|
||||
Severity: CtINFO,
|
||||
Severity: CtInfo,
|
||||
})
|
||||
} else {
|
||||
grpclog.InfoDepth(1, args...)
|
||||
l.InfoDepth(1, args...)
|
||||
}
|
||||
}
|
||||
|
||||
// Infof logs through grpclog.Infof and adds a trace event if channelz is on.
|
||||
func Infof(id int64, format string, args ...interface{}) {
|
||||
// Infof logs and adds a trace event if channelz is on.
|
||||
func Infof(l grpclog.DepthLoggerV2, id int64, format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
if IsOn() {
|
||||
AddTraceEvent(id, 1, &TraceEventDesc{
|
||||
AddTraceEvent(l, id, 1, &TraceEventDesc{
|
||||
Desc: msg,
|
||||
Severity: CtINFO,
|
||||
Severity: CtInfo,
|
||||
})
|
||||
} else {
|
||||
grpclog.InfoDepth(1, msg)
|
||||
l.InfoDepth(1, msg)
|
||||
}
|
||||
}
|
||||
|
||||
// Warning logs through grpclog.Warning and adds a trace event if channelz is on.
|
||||
func Warning(id int64, args ...interface{}) {
|
||||
// Warning logs and adds a trace event if channelz is on.
|
||||
func Warning(l grpclog.DepthLoggerV2, id int64, args ...interface{}) {
|
||||
if IsOn() {
|
||||
AddTraceEvent(id, 1, &TraceEventDesc{
|
||||
AddTraceEvent(l, id, 1, &TraceEventDesc{
|
||||
Desc: fmt.Sprint(args...),
|
||||
Severity: CtWarning,
|
||||
})
|
||||
} else {
|
||||
grpclog.WarningDepth(1, args...)
|
||||
l.WarningDepth(1, args...)
|
||||
}
|
||||
}
|
||||
|
||||
// Warningf logs through grpclog.Warningf and adds a trace event if channelz is on.
|
||||
func Warningf(id int64, format string, args ...interface{}) {
|
||||
// Warningf logs and adds a trace event if channelz is on.
|
||||
func Warningf(l grpclog.DepthLoggerV2, id int64, format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
if IsOn() {
|
||||
AddTraceEvent(id, 1, &TraceEventDesc{
|
||||
AddTraceEvent(l, id, 1, &TraceEventDesc{
|
||||
Desc: msg,
|
||||
Severity: CtWarning,
|
||||
})
|
||||
} else {
|
||||
grpclog.WarningDepth(1, msg)
|
||||
l.WarningDepth(1, msg)
|
||||
}
|
||||
}
|
||||
|
||||
// Error logs through grpclog.Error and adds a trace event if channelz is on.
|
||||
func Error(id int64, args ...interface{}) {
|
||||
// Error logs and adds a trace event if channelz is on.
|
||||
func Error(l grpclog.DepthLoggerV2, id int64, args ...interface{}) {
|
||||
if IsOn() {
|
||||
AddTraceEvent(id, 1, &TraceEventDesc{
|
||||
AddTraceEvent(l, id, 1, &TraceEventDesc{
|
||||
Desc: fmt.Sprint(args...),
|
||||
Severity: CtError,
|
||||
})
|
||||
} else {
|
||||
grpclog.ErrorDepth(1, args...)
|
||||
l.ErrorDepth(1, args...)
|
||||
}
|
||||
}
|
||||
|
||||
// Errorf logs through grpclog.Errorf and adds a trace event if channelz is on.
|
||||
func Errorf(id int64, format string, args ...interface{}) {
|
||||
// Errorf logs and adds a trace event if channelz is on.
|
||||
func Errorf(l grpclog.DepthLoggerV2, id int64, format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
if IsOn() {
|
||||
AddTraceEvent(id, 1, &TraceEventDesc{
|
||||
AddTraceEvent(l, id, 1, &TraceEventDesc{
|
||||
Desc: msg,
|
||||
Severity: CtError,
|
||||
})
|
||||
} else {
|
||||
grpclog.ErrorDepth(1, msg)
|
||||
l.ErrorDepth(1, msg)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user