logging

package
v0.16.1-patch1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NullLogger = &logrus.Logger{
	Out:       io.Discard,
	Formatter: new(logrus.TextFormatter),
	Hooks:     make(logrus.LevelHooks),
	Level:     logrus.PanicLevel,
}

Functions

func SanitizeUserInput

func SanitizeUserInput(str string) string

func WithStacktrace

func WithStacktrace(logger logrus.FieldLogger, err error) logrus.FieldLogger

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

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