logging

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CRITICAL level = iota
	ERROR
	WARNING
	NOTICE
	INFO
	DEBUG
)

Variables

This section is empty.

Functions

func GetLogger

func GetLogger() (log *logger)

GetLogger returns the current logger instance

func InitLogging added in v0.16.0

func InitLogging(id string, color bool, loggers []*Logger) (err error)

Types

type Backend added in v0.20.1

type Backend interface {
	Core(msgPriority zap.LevelEnablerFunc, encoder zapcore.Encoder) zapcore.Core
}

func NewFileBackend added in v0.20.1

func NewFileBackend(filename string) (Backend, error)

func NewStdioBackend added in v0.20.1

func NewStdioBackend(file *os.File) Backend

func NewSyslogBackend added in v0.20.1

func NewSyslogBackend(tag string) (Backend, error)

type Logger added in v0.16.0

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

func NewLogger added in v0.20.1

func NewLogger(backend Backend, logLevel string, encoding string) *Logger

Source Files

  • logging.go
  • syslog.go

Jump to

Keyboard shortcuts

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