zap: go.uber.org/zap/zapgrpc Index | Files

package zapgrpc

import "go.uber.org/zap/zapgrpc"

Package zapgrpc provides a logger that is compatible with grpclog.

Index

Package Files

zapgrpc.go

type Logger Uses

type Logger struct {
    // contains filtered or unexported fields
}

Logger adapts zap's Logger to be compatible with grpclog.Logger.

func NewLogger Uses

func NewLogger(l *zap.Logger, options ...Option) *Logger

NewLogger returns a new Logger.

By default, Loggers print at zap's InfoLevel.

func (*Logger) Fatal Uses

func (l *Logger) Fatal(args ...interface{})

Fatal implements grpclog.Logger.

func (*Logger) Fatalf Uses

func (l *Logger) Fatalf(format string, args ...interface{})

Fatalf implements grpclog.Logger.

func (*Logger) Fatalln Uses

func (l *Logger) Fatalln(args ...interface{})

Fatalln implements grpclog.Logger.

func (*Logger) Print Uses

func (l *Logger) Print(args ...interface{})

Print implements grpclog.Logger.

func (*Logger) Printf Uses

func (l *Logger) Printf(format string, args ...interface{})

Printf implements grpclog.Logger.

func (*Logger) Println Uses

func (l *Logger) Println(args ...interface{})

Println implements grpclog.Logger.

type Option Uses

type Option interface {
    // contains filtered or unexported methods
}

An Option overrides a Logger's default configuration.

func WithDebug Uses

func WithDebug() Option

WithDebug configures a Logger to print at zap's DebugLevel instead of InfoLevel.

Package zapgrpc imports 1 packages (graph) and is imported by 6 packages. Updated 2017-04-14. Refresh now. Tools for package owners.