log

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimestampFieldNameDefault = "t"
	MessageFieldNameDefault   = "msg"
)

Variables

This section is empty.

Functions

func ClientLoggerUnaryInterceptor added in v0.0.9

func ClientLoggerUnaryInterceptor(from, to string) grpc.UnaryClientInterceptor

ClientLoggerUnaryInterceptor returns a new unary client interceptor for log from what to

func InitLog

func InitLog(out io.Writer, isProd bool)

InitLog initializes zerolog for this service you need provide stdout for your log this function will init default logger with default formatter and default hook

func SetDefaultDevLogger added in v0.1.0

func SetDefaultDevLogger(w io.Writer)

func SetDefaultProductionLogger added in v0.1.0

func SetDefaultProductionLogger(w io.Writer)

Types

type GRPCServerMWHook added in v0.1.0

type GRPCServerMWHook struct{}

GRPCServerMWHook will add req-id and handler name to your log

func (GRPCServerMWHook) Run added in v0.1.0

Jump to

Keyboard shortcuts

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