logging

package
v0.3.45 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SanitizeUserInput added in v0.2.14

func SanitizeUserInput(str string) string

func StreamServerInterceptor added in v0.2.15

func StreamServerInterceptor() grpc.StreamServerInterceptor

StreamServerInterceptor returns an interceptor that adds the request id as a field to the logrus logger embedded in the context. If an error occurs in the handler, it also adds a stack trace.

func UnaryServerInterceptor added in v0.2.15

func UnaryServerInterceptor() grpc.UnaryServerInterceptor

UnaryServerInterceptor returns an interceptor that adds the request id as a field to the logrus logger embedded in the context. If an error occurs in the handler, it also adds a stack trace.

func WithStacktrace added in v0.3.0

func WithStacktrace(logger *logrus.Entry, err error) *logrus.Entry

WithStacktrace returns a new logrus.Entry obtained by adding error information and, if available, a stack trace as fields to the provided logrus.Entry.

Types

type CommandLineFormatter

type CommandLineFormatter struct{}

func (*CommandLineFormatter) Format

func (f *CommandLineFormatter) Format(entry *log.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

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