log

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelDebug = iota
	LevelInfo
	LevelWarn
	LevelError
	LevelFatal
)

Variables

View Source
var DefaultLogger *log.Logger

Functions

func Debug

func Debug(v ...interface{})

func Debugf

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

func Error

func Error(v ...interface{})

func Errorf

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

func Fatal

func Fatal(v ...interface{})

func Fatalf

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

func Info

func Info(v ...interface{})

func Infof

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

func SetFlags

func SetFlags(flag int)

func SetLevel

func SetLevel(level int)

func SetOptput

func SetOptput(w io.Writer)

func Warn

func Warn(v ...interface{})

func Warnf

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

Types

type Writer

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

func NewWriter

func NewWriter(opt *WriterOptions) *Writer

func (*Writer) Index

func (w *Writer) Index() (int, error)

func (*Writer) Open

func (w *Writer) Open() error

func (*Writer) Reset

func (w *Writer) Reset() error

func (*Writer) Write

func (w *Writer) Write(b []byte) (int, error)

type WriterOptions

type WriterOptions struct {
	Dir            string
	FileNameFormat string
	Size           int64
	Prefix         string
	Suffix         string
}

Jump to

Keyboard shortcuts

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