log

package
v0.0.0-...-7b8bf0e Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2015 License: Apache-2.0 Imports: 3 Imported by: 14

Documentation

Index

Constants

View Source
const (
	SeverityWarning = "WARN"
	SeverityError   = "ERROR"
	SeverityInfo    = "INFO"
	SeverityDebug   = "DEBUG"
)

Variables

This section is empty.

Functions

func EnsureLoggerExist

func EnsureLoggerExist(name, severity string) (err error)

func Errorf

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

func GetGlobalLogger

func GetGlobalLogger() utils.Logger

func GetSeverity

func GetSeverity() string

func Infof

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

func SetLogger

func SetLogger(l Logger)

func SetSeverity

func SetSeverity(s string) error

func Warningf

func Warningf(format string, args ...interface{})

Types

type DefaultLogger

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

func (DefaultLogger) Errorf

func (d DefaultLogger) Errorf(format string, args ...interface{})

func (DefaultLogger) GetSeverity

func (d DefaultLogger) GetSeverity() string

func (DefaultLogger) Infof

func (d DefaultLogger) Infof(format string, args ...interface{})

func (DefaultLogger) SetSeverity

func (d DefaultLogger) SetSeverity(s string) error

func (DefaultLogger) Warningf

func (d DefaultLogger) Warningf(format string, args ...interface{})

type Logger

type Logger interface {
	SetSeverity(s string) error
	GetSeverity() string

	Infof(format string, args ...interface{})
	Warningf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
}

func NewDefaultLogger

func NewDefaultLogger(name, severity string) (Logger, error)

Jump to

Keyboard shortcuts

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