Involved Source Files Package internal contains functionality internal to the grpclog package.logger.gologgerv2.go
Package-Level Type Names (total 6, in which 5 are exported)
/* sort exporteds by: | */
DepthLoggerV2 logs at a specified call frame. If a LoggerV2 also implements
DepthLoggerV2, the below functions will be called with the appropriate stack
depth set for trivial functions the logger may ignore.
# Experimental
Notice: This type is EXPERIMENTAL and may be changed or removed in a
later release. Error logs to ERROR log. Arguments are handled in the manner of fmt.Print. ErrorDepth logs to ERROR log at the specified depth. Arguments are handled in the manner of fmt.Println. Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf. Errorln logs to ERROR log. Arguments are handled in the manner of fmt.Println. Fatal logs to ERROR log. Arguments are handled in the manner of fmt.Print.
gRPC ensures that all Fatal logs will exit with os.Exit(1).
Implementations may also call os.Exit() with a non-zero exit code. FatalDepth logs to FATAL log at the specified depth. Arguments are handled in the manner of fmt.Println. Fatalf logs to ERROR log. Arguments are handled in the manner of fmt.Printf.
gRPC ensures that all Fatal logs will exit with os.Exit(1).
Implementations may also call os.Exit() with a non-zero exit code. Fatalln logs to ERROR log. Arguments are handled in the manner of fmt.Println.
gRPC ensures that all Fatal logs will exit with os.Exit(1).
Implementations may also call os.Exit() with a non-zero exit code. Info logs to INFO log. Arguments are handled in the manner of fmt.Print. InfoDepth logs to INFO log at the specified depth. Arguments are handled in the manner of fmt.Println. Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf. Infoln logs to INFO log. Arguments are handled in the manner of fmt.Println. V reports whether verbosity level l is at least the requested verbose level. Warning logs to WARNING log. Arguments are handled in the manner of fmt.Print. WarningDepth logs to WARNING log at the specified depth. Arguments are handled in the manner of fmt.Println. Warningf logs to WARNING log. Arguments are handled in the manner of fmt.Printf. Warningln logs to WARNING log. Arguments are handled in the manner of fmt.Println.
google.golang.org/grpc/grpclog.DepthLoggerV2(interface)
*google.golang.org/grpc/grpclog.componentData
DepthLoggerV2 : LoggerV2
DepthLoggerV2 : google.golang.org/grpc/grpclog.DepthLoggerV2
DepthLoggerV2 : google.golang.org/grpc/grpclog.LoggerV2
DepthLoggerV2 : go.uber.org/goleak.TestingT
DepthLoggerV2 : go.uber.org/mock/gomock.TestReporter
var DepthLoggerV2Impl
Logger mimics golang's standard Logger as an interface.
Deprecated: use LoggerV2.( Logger) Fatal(args ...any)( Logger) Fatalf(format string, args ...any)( Logger) Fatalln(args ...any)( Logger) Print(args ...any)( Logger) Printf(format string, args ...any)( Logger) Println(args ...any)LoggerWrapper
google.golang.org/grpc/grpclog.Logger(interface)
*log.Logger
Logger : google.golang.org/grpc/grpclog.Logger
LoggerV2 does underlying logging work for grpclog. Error logs to ERROR log. Arguments are handled in the manner of fmt.Print. Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf. Errorln logs to ERROR log. Arguments are handled in the manner of fmt.Println. Fatal logs to ERROR log. Arguments are handled in the manner of fmt.Print.
gRPC ensures that all Fatal logs will exit with os.Exit(1).
Implementations may also call os.Exit() with a non-zero exit code. Fatalf logs to ERROR log. Arguments are handled in the manner of fmt.Printf.
gRPC ensures that all Fatal logs will exit with os.Exit(1).
Implementations may also call os.Exit() with a non-zero exit code. Fatalln logs to ERROR log. Arguments are handled in the manner of fmt.Println.
gRPC ensures that all Fatal logs will exit with os.Exit(1).
Implementations may also call os.Exit() with a non-zero exit code. Info logs to INFO log. Arguments are handled in the manner of fmt.Print. Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf. Infoln logs to INFO log. Arguments are handled in the manner of fmt.Println. V reports whether verbosity level l is at least the requested verbose level. Warning logs to WARNING log. Arguments are handled in the manner of fmt.Print. Warningf logs to WARNING log. Arguments are handled in the manner of fmt.Printf. Warningln logs to WARNING log. Arguments are handled in the manner of fmt.Println.DepthLoggerV2(interface)
*LoggerWrapper
google.golang.org/grpc/grpclog.DepthLoggerV2(interface)
google.golang.org/grpc/grpclog.LoggerV2(interface)
*loggerT
*google.golang.org/grpc/grpclog.componentData
LoggerV2 : google.golang.org/grpc/grpclog.LoggerV2
LoggerV2 : go.uber.org/goleak.TestingT
LoggerV2 : go.uber.org/mock/gomock.TestReporter
func NewLoggerV2(infoW, warningW, errorW io.Writer, c LoggerV2Config) LoggerV2
var LoggerV2Impl
LoggerV2Config configures the LoggerV2 implementation. FormatJSON controls whether the logger should output logs in JSON format. Verbosity sets the verbosity level of the logger.
func NewLoggerV2(infoW, warningW, errorW io.Writer, c LoggerV2Config) LoggerV2
LoggerWrapper wraps Logger into a LoggerV2.LoggerLogger Error logs to ERROR log. Arguments are handled in the manner of fmt.Print. Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf. Errorln logs to ERROR log. Arguments are handled in the manner of fmt.Println.( LoggerWrapper) Fatal(args ...any)( LoggerWrapper) Fatalf(format string, args ...any)( LoggerWrapper) Fatalln(args ...any) Info logs to INFO log. Arguments are handled in the manner of fmt.Print. Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf. Infoln logs to INFO log. Arguments are handled in the manner of fmt.Println.( LoggerWrapper) Print(args ...any)( LoggerWrapper) Printf(format string, args ...any)( LoggerWrapper) Println(args ...any) V reports whether verbosity level l is at least the requested verbose level. Warning logs to WARNING log. Arguments are handled in the manner of fmt.Print. Warningf logs to WARNING log. Arguments are handled in the manner of fmt.Printf. Warningln logs to WARNING log. Arguments are handled in the manner of fmt.Println.
LoggerWrapper : Logger
*LoggerWrapper : LoggerV2
LoggerWrapper : google.golang.org/grpc/grpclog.Logger
*LoggerWrapper : google.golang.org/grpc/grpclog.LoggerV2
*LoggerWrapper : go.uber.org/goleak.TestingT
*LoggerWrapper : go.uber.org/mock/gomock.TestReporter
Package-Level Functions (total 2, in which 1 is exported)
NewLoggerV2 creates a new LoggerV2 instance with the provided configuration.
The infoW, warningW, and errorW writers are used to write log messages of
different severity levels.
combineLoggers returns a combined logger for both higher & lower severity logs,
or only one if the other is io.Discard.
This uses io.Discard instead of io.MultiWriter when all loggers
are set to io.Discard. Both this package and the standard log package have
significant optimizations for io.Discard, which io.MultiWriter lacks (as of
this writing).
Package-Level Variables (total 7, in which 2 are exported)
DepthLoggerV2Impl is the logger used for the depth log functions.
LoggerV2Impl is the logger used for the non-depth log functions.
exit is os.Exit.
This var exists to make it possible to test functions calling os.Exit.
severityName contains the string representation of each severity.
sprint is fmt.Sprint.
These vars exist to make it possible to test that expensive format calls aren't made unnecessarily.
sprintf is fmt.Sprintf.
These vars exist to make it possible to test that expensive format calls aren't made unnecessarily.
sprintln is fmt.Sprintln.
These vars exist to make it possible to test that expensive format calls aren't made unnecessarily.
Package-Level Constants (total 4, none are exported)
errorLog indicates Error severity.
fatalLog indicates Fatal severity.
infoLog indicates Info severity.
warningLog indicates Warning severity.
The pages are generated with Goldsv0.7.6. (GOOS=linux GOARCH=amd64)