log

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

Debug logging.

func Debugf

func Debugf(msg string, args ...interface{})

Debugf logging.

func Error

func Error(args ...interface{})

Error logging.

func Errorf

func Errorf(msg string, args ...interface{})

Errorf logging.

func Fatal

func Fatal(args ...interface{})

Fatal logging.

func Fatalf

func Fatalf(msg string, args ...interface{})

Fatalf logging.

func Info

func Info(args ...interface{})

Info logging.

func Infof

func Infof(msg string, args ...interface{})

Infof logging.

func Panic

func Panic(args ...interface{})

Panic logging.

func Panicf

func Panicf(msg string, args ...interface{})

Panicf logging.

func Setup

func Setup(f FactoryFunc, fls map[string]interface{}) error

Setup logging by providing a logger factory.

func Warn

func Warn(args ...interface{})

Warn logging.

func Warnf

func Warnf(msg string, args ...interface{})

Warnf logging.

Types

type FactoryFunc added in v0.4.6

type FactoryFunc func(map[string]interface{}) Logger

FactoryFunc function type for creating loggers.

type Level

type Level string

The Level type definition.

const (
	// DebugLevel level.
	DebugLevel Level = "debug"
	// InfoLevel level.
	InfoLevel Level = "info"
	// WarnLevel level.
	WarnLevel Level = "warn"
	// ErrorLevel level.
	ErrorLevel Level = "error"
	// FatalLevel level.
	FatalLevel Level = "fatal"
	// PanicLevel level.
	PanicLevel Level = "panic"
	// NoLevel level.
	NoLevel Level = ""
)

type Logger

type Logger interface {
	Fatal(...interface{})
	Fatalf(string, ...interface{})
	Panic(...interface{})
	Panicf(string, ...interface{})
	Error(...interface{})
	Errorf(string, ...interface{})
	Warn(...interface{})
	Warnf(string, ...interface{})
	Info(...interface{})
	Infof(string, ...interface{})
	Debug(...interface{})
	Debugf(string, ...interface{})
}

Logger interface definition of a logger.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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