log

package
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	// WithField creates a new child logger with the specified field
	WithField(key string, value interface{}) Logger
	// WithFields creates a new child logger with the specified list of fields
	WithFields(fields logrus.Fields) Logger
	// WithError creates a new child logger with the specified error field
	WithError(err error) Logger

	// Debugf outputs the message given with format and args
	// on debug level
	Debugf(format string, args ...interface{})
	// Infof outputs the message given with format and args
	// on info level
	Infof(format string, args ...interface{})
	// Warnf outputs the message given with format and args
	// on warning level
	Warnf(format string, args ...interface{})
	// Errorf outputs the message given with format and args
	// on error level
	Errorf(format string, args ...interface{})

	// Debug outputs the specified args on debug level
	Debug(args ...interface{})
	// Info outputs the specified args on info level
	Info(args ...interface{})
	// Warn outputs the specified args on warning level
	Warn(args ...interface{})
	// Error outputs the specified args on error level
	Error(args ...interface{})

	// Writer creates a new io.Writer that streams to this logger.
	// Writer logs at info level
	Writer() *io.PipeWriter
	// WriterLevel creates a new io.Writer that streams to this logger.
	// Writer logs at the specified level
	WriterLevel(logrus.Level) *io.PipeWriter
}

Logger defines a subset of the structured logging interface

func New

func New(entry *logrus.Entry) Logger

New creates a new logger for the specified entry

Jump to

Keyboard shortcuts

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