Movatterモバイル変換


[0]ホーム

URL:


grpclog

package
v1.77.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2025 License:Apache-2.0Imports:6Imported by:29,009

Details

Repository

github.com/grpc/grpc-go

Links

Documentation

Overview

Package grpclog defines logging for grpc.

In the default logger, severity level can be set by environment variableGRPC_GO_LOG_SEVERITY_LEVEL, verbosity level can be set byGRPC_GO_LOG_VERBOSITY_LEVEL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcErroradded inv1.5.0

func Error(args ...any)

Error logs to the ERROR log.

funcErrorDepthadded inv1.66.0

func ErrorDepth(depthint, args ...any)

ErrorDepth logs to the ERROR log at the specified depth.

Experimental

Notice: This API is EXPERIMENTAL and may be changed or removed in alater release.

funcErrorfadded inv1.5.0

func Errorf(formatstring, args ...any)

Errorf logs to the ERROR log. Arguments are handled in the manner of fmt.Printf.

funcErrorlnadded inv1.5.0

func Errorln(args ...any)

Errorln logs to the ERROR log. Arguments are handled in the manner of fmt.Println.

funcFatal

func Fatal(args ...any)

Fatal logs to the FATAL log. Arguments are handled in the manner of fmt.Print.It calls os.Exit() with exit code 1.

funcFatalDepthadded inv1.66.0

func FatalDepth(depthint, args ...any)

FatalDepth logs to the FATAL log at the specified depth.

Experimental

Notice: This API is EXPERIMENTAL and may be changed or removed in alater release.

funcFatalf

func Fatalf(formatstring, args ...any)

Fatalf logs to the FATAL log. Arguments are handled in the manner of fmt.Printf.It calls os.Exit() with exit code 1.

funcFatalln

func Fatalln(args ...any)

Fatalln logs to the FATAL log. Arguments are handled in the manner of fmt.Println.It calls os.Exit() with exit code 1.

funcInfoadded inv1.5.0

func Info(args ...any)

Info logs to the INFO log.

funcInfoDepthadded inv1.66.0

func InfoDepth(depthint, args ...any)

InfoDepth logs to the INFO log at the specified depth.

Experimental

Notice: This API is EXPERIMENTAL and may be changed or removed in alater release.

funcInfofadded inv1.5.0

func Infof(formatstring, args ...any)

Infof logs to the INFO log. Arguments are handled in the manner of fmt.Printf.

funcInfolnadded inv1.5.0

func Infoln(args ...any)

Infoln logs to the INFO log. Arguments are handled in the manner of fmt.Println.

funcPrintdeprecated

func Print(args ...any)

Print prints to the logger. Arguments are handled in the manner of fmt.Print.

Deprecated: use Info.

funcPrintfdeprecated

func Printf(formatstring, args ...any)

Printf prints to the logger. Arguments are handled in the manner of fmt.Printf.

Deprecated: use Infof.

funcPrintlndeprecated

func Println(args ...any)

Println prints to the logger. Arguments are handled in the manner of fmt.Println.

Deprecated: use Infoln.

funcSetLoggerdeprecated

func SetLogger(lLogger)

SetLogger sets the logger that is used in grpc. Call only frominit() functions.

Deprecated: use SetLoggerV2.

funcSetLoggerV2added inv1.5.0

func SetLoggerV2(lLoggerV2)

SetLoggerV2 sets logger that is used in grpc to a V2 logger.Not mutex-protected, should be called before any gRPC functions.

funcVadded inv1.5.0

func V(lint)bool

V reports whether verbosity level l is at least the requested verbose level.

funcWarningadded inv1.5.0

func Warning(args ...any)

Warning logs to the WARNING log.

funcWarningDepthadded inv1.66.0

func WarningDepth(depthint, args ...any)

WarningDepth logs to the WARNING log at the specified depth.

Experimental

Notice: This API is EXPERIMENTAL and may be changed or removed in alater release.

funcWarningfadded inv1.5.0

func Warningf(formatstring, args ...any)

Warningf logs to the WARNING log. Arguments are handled in the manner of fmt.Printf.

funcWarninglnadded inv1.5.0

func Warningln(args ...any)

Warningln logs to the WARNING log. Arguments are handled in the manner of fmt.Println.

Types

typeDepthLoggerV2added inv1.28.0

type DepthLoggerV2internal.DepthLoggerV2

DepthLoggerV2 logs at a specified call frame. If a LoggerV2 also implementsDepthLoggerV2, the below functions will be called with the appropriate stackdepth set for trivial functions the logger may ignore.

Experimental

Notice: This type is EXPERIMENTAL and may be changed or removed in alater release.

funcComponentadded inv1.31.0

func Component(componentNamestring)DepthLoggerV2

Component creates a new component and returns it for logging. If a componentwith the name already exists, nothing will be created and it will bereturned. SetLoggerV2 will panic if it is called with a logger created byComponent.

typeLoggerdeprecated

type Loggerinternal.Logger

Logger mimics golang's standard Logger as an interface.

Deprecated: use LoggerV2.

typeLoggerV2added inv1.5.0

type LoggerV2internal.LoggerV2

LoggerV2 does underlying logging work for grpclog.

funcNewLoggerV2added inv1.5.0

func NewLoggerV2(infoW, warningW, errorWio.Writer)LoggerV2

NewLoggerV2 creates a loggerV2 with the provided writers.Fatal logs will be written to errorW, warningW, infoW, followed by exit(1).Error logs will be written to errorW, warningW and infoW.Warning logs will be written to warningW and infoW.Info logs will be written to infoW.

funcNewLoggerV2WithVerbosityadded inv1.5.0

func NewLoggerV2WithVerbosity(infoW, warningW, errorWio.Writer, vint)LoggerV2

NewLoggerV2WithVerbosity creates a loggerV2 with the provided writers andverbosity level.

Source Files

View all Source files

Directories

PathSynopsis
Package glogger defines glog-based logging for grpc.
Package glogger defines glog-based logging for grpc.
Package internal contains functionality internal to the grpclog package.
Package internal contains functionality internal to the grpclog package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp