log

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 6 Imported by: 93

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LibraryRepository string

LibraryRepository that is passed into with -ldflags

Functions

func DeferExitHandler added in v1.9.0

func DeferExitHandler(handler func())

DeferExitHandler registers a logrus exit handler to allow cleanup activities.

func Entry

func Entry() *logrus.Entry

Entry returns the logger entry or creates one if none is present.

func RegisterHook added in v1.25.0

func RegisterHook(hook logrus.Hook)

RegisterHook registers a logrus hook

func RegisterSecret added in v1.23.0

func RegisterSecret(secret string)

func SetStepName

func SetStepName(stepName string)

SetStepName sets the stepName field.

func SetVerbose

func SetVerbose(verbose bool)

SetVerbose sets the log level with respect to verbose flag.

Types

type FatalHook added in v1.25.0

type FatalHook struct {
	Path          string
	CorrelationID string
}

FatalHook provides a logrus hook which persists details about a fatal error into the file system. This is helpful in order to transfer the error details to an orchestrating CI/CD system and by that make it possible to provide better error messages to the user.

func (*FatalHook) Fire added in v1.25.0

func (f *FatalHook) Fire(entry *logrus.Entry) error

Fire persists the error message of the fatal error as json file into the file system.

func (*FatalHook) Levels added in v1.25.0

func (f *FatalHook) Levels() []logrus.Level

Levels returns the supported log level of the hook.

type RemoveSecretFormatterDecorator added in v1.23.0

type RemoveSecretFormatterDecorator struct {
	logrus.TextFormatter
}

func (*RemoveSecretFormatterDecorator) Format added in v1.23.0

func (formatter *RemoveSecretFormatterDecorator) Format(entry *logrus.Entry) (bytes []byte, err error)

Jump to

Keyboard shortcuts

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