logger

package
v1.5.0-rc4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

Debug ...

func Debugf

func Debugf(format string, v ...interface{})

Debugf for debuging with format

func Error

func Error(v ...interface{})

Error for logging error

func Errorf

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

Errorf for logging error with format

func Fatal

func Fatal(v ...interface{})

Fatal ...

func Fatalf

func Fatalf(format string, v ...interface{})

Fatalf for fatal error with error

func Info

func Info(v ...interface{})

Info ...

func Infof

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

Infof for logging info with format

func SetLogger

func SetLogger(logger Interface)

SetLogger sets the logger implementation

func Warning

func Warning(v ...interface{})

Warning ...

func Warningf

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

Warningf for warning with format

Types

type Closer

type Closer interface {
	//Close the opened io stream
	Close() error
}

Closer defines method to close the open io stream used by logger.

type Interface

type Interface interface {
	//For debuging
	Debug(v ...interface{})

	//For debuging with format
	Debugf(format string, v ...interface{})

	//For logging info
	Info(v ...interface{})

	//For logging info with format
	Infof(format string, v ...interface{})

	//For warning
	Warning(v ...interface{})

	//For warning with format
	Warningf(format string, v ...interface{})

	//For logging error
	Error(v ...interface{})

	//For logging error with format
	Errorf(format string, v ...interface{})

	//For fatal error
	Fatal(v ...interface{})

	//For fatal error with error
	Fatalf(format string, v ...interface{})
}

Interface for logger.

type Sweeper

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

Sweeper takes charge of archive the outdated log files of jobs.

func NewSweeper

func NewSweeper(ctx context.Context, workDir string, period uint) *Sweeper

NewSweeper creates new prt of Sweeper

func (*Sweeper) Start

func (s *Sweeper) Start()

Start to work

Jump to

Keyboard shortcuts

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