logging

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Now   = time.Now
	Since = time.Since
)

Functions

func StreamInterceptor

func StreamInterceptor(opts ...Option) grpc.StreamServerInterceptor

StreamInterceptor returns a grpc.StreamServerInterceptor that do logging.

func UnaryInterceptor

func UnaryInterceptor(opts ...Option) grpc.UnaryServerInterceptor

UnaryInterceptor returns a grpc.UnaryServerInterceptor that do logging.

Types

type Option

type Option func(o *options)

Option is logging interceptor option func.

func WithLogName

func WithLogName(name string) Option

WithLogName sets the log name. Default log name is "grpc.server.logging".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL