logger

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Formatter is the format configuration to write logs into text
	Formatter = logrus.TextFormatter{
		DisableTimestamp: false,
	}

	// TestLogWriter is a buffer in which all logs generated by a test are
	// stored
	TestLogWriter bytes.Buffer
	// TestLogFileName is the file name to dump `TestLogWriter` content when
	// test finish
	TestLogFileName = "test-output.log"
)

Functions

func TestLogWriterReset

func TestLogWriterReset()

TestLogWriterReset resets the current buffer

Types

type LogHook

type LogHook struct{}

LogHook to send logs via `ginkgo.GinkgoWriter`.

func (*LogHook) Fire

func (h *LogHook) Fire(entry *logrus.Entry) (err error)

Fire is a callback function used by logrus to write logs that match in the given by `Levels` method

func (*LogHook) Levels

func (h *LogHook) Levels() []logrus.Level

Levels defined levels to send logs to FireAction

Jump to

Keyboard shortcuts

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