log

package
v0.0.0-...-b830f10 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChannelSingle = iota
	ChannelDaily
)
View Source
const (
	LevelDebug = iota
	LevelInfo
	LevelNotice
	LevelWarning
	LevelError
	LevelPanic
)

Variables

This section is empty.

Functions

func Debug

func Debug(s string, v ...interface{})

func Error

func Error(s string, v ...interface{})

func GetOutput

func GetOutput() io.Writer

func Info

func Info(s string, v ...interface{})

func Notice

func Notice(s string, v ...interface{})

func Panic

func Panic(s string, v ...interface{})

func SetOutput

func SetOutput(w io.Writer)

func SetPrefix

func SetPrefix(prefix string)

func Warning

func Warning(s string, v ...interface{})

Types

type FileHandler

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

func NewFileHandler

func NewFileHandler(path string, channel int) *FileHandler

func (*FileHandler) Close

func (f *FileHandler) Close() error

func (*FileHandler) Write

func (f *FileHandler) Write(p []byte) (int, error)

type Logger

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

func New

func New(out io.Writer) *Logger

func (*Logger) Debug

func (l *Logger) Debug(s string, v ...interface{})

func (*Logger) Error

func (l *Logger) Error(s string, v ...interface{})

func (*Logger) GetOutput

func (l *Logger) GetOutput() io.Writer

func (*Logger) Info

func (l *Logger) Info(s string, v ...interface{})

func (*Logger) Notice

func (l *Logger) Notice(s string, v ...interface{})

func (*Logger) Output

func (l *Logger) Output(level int, s string)

func (*Logger) Panic

func (l *Logger) Panic(s string, v ...interface{})

func (*Logger) SetLevel

func (l *Logger) SetLevel(level int)

func (*Logger) SetOutput

func (l *Logger) SetOutput(w io.Writer)

func (*Logger) SetPrefix

func (l *Logger) SetPrefix(prefix string)

func (*Logger) Warning

func (l *Logger) Warning(s string, v ...interface{})

Jump to

Keyboard shortcuts

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