logger

package
v0.0.0-...-6a1c4ee Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	// Info prints info message.
	Info(args ...interface{})

	// Infof prints formatted info message.
	Infof(template string, args ...interface{})

	// Warn prints warning message.
	Warn(args ...interface{})

	// Warnf prints formatted warning message.
	Warnf(template string, args ...interface{})

	// Error prints error message.
	Error(args ...interface{})

	// Errorf prints formatted error message.
	Errorf(template string, args ...interface{})

	// Fatal prints fatal message and calls os.Exit.
	Fatal(args ...interface{})

	// Fatalf prints formatted fatal message and calls os.Exit.
	Fatalf(template string, args ...interface{})
}

Interface describes logger API.

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger default implementation of logging.Interface.

func NewLogger

func NewLogger(verbose bool) *Logger

NewLogger instantiates logger instance that should be used. Depending on `verbose` flag it either prints everything or only high priority messages (of at least warning level).

func (*Logger) Error

func (l *Logger) Error(args ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(template string, args ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(args ...interface{})

func (*Logger) Fatalf

func (l *Logger) Fatalf(template string, args ...interface{})

func (*Logger) Info

func (l *Logger) Info(args ...interface{})

func (*Logger) Infof

func (l *Logger) Infof(template string, args ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(args ...interface{})

func (*Logger) Warnf

func (l *Logger) Warnf(template string, args ...interface{})

Jump to

Keyboard shortcuts

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