package internal
Import Path
google.golang.org/grpc/grpclog/internal (on go.dev)
Dependency Relation
imports 5 packages, and imported by one package
Involved Source Files
Package internal contains functionality internal to the grpclog package.
logger.go
loggerv2.go
Package-Level Type Names (total 5)
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)
DepthLoggerV2 : LoggerV2
DepthLoggerV2 : google.golang.org/grpc/grpclog.DepthLoggerV2
DepthLoggerV2 : google.golang.org/grpc/grpclog.LoggerV2
DepthLoggerV2 : github.com/stretchr/testify/assert.TestingT
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)
*github.com/coreos/pkg/capnslog.PackageLogger
*log.Logger
Logger : google.golang.org/grpc/grpclog.Logger
Logger : github.com/go-sql-driver/mysql.Logger
Logger : go.uber.org/fx.Printer
Logger : gorm.io/gorm/logger.Writer
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)
LoggerV2 : google.golang.org/grpc/grpclog.LoggerV2
LoggerV2 : github.com/stretchr/testify/assert.TestingT
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.
Logger Logger
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 : github.com/go-sql-driver/mysql.Logger
*LoggerWrapper : github.com/stretchr/testify/assert.TestingT
LoggerWrapper : go.uber.org/fx.Printer
LoggerWrapper : gorm.io/gorm/logger.Writer
Package-Level Functions (only one)
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.
Package-Level Variables (total 2)
DepthLoggerV2Impl is the logger used for the depth log functions.
LoggerV2Impl is the logger used for the non-depth log functions.
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |