ilog

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFile  = "itea.log"
	DefaultClean = 30
	TypeInfo     = "INFO"
	TypeError    = "ERROR"
	TypeDebug    = "DEBUG"
	TypeFatal    = "FATAL"
)

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

func Done

func Done() bool

func Error

func Error(v ...interface{})

func Fatal

func Fatal(v ...interface{})

func Info

func Info(v ...interface{})

func Init

func Init(l LogConstruct, opts ...IOption)

func NewItem added in v1.0.5

func NewItem(p string, o option) *item

Types

type Console

type Console struct {
}

func (*Console) Debug

func (*Console) Debug(v ...interface{})

func (*Console) Done

func (*Console) Done() bool

func (*Console) Error

func (*Console) Error(v ...interface{})

func (*Console) Fatal

func (*Console) Fatal(v ...interface{})

func (*Console) Info

func (*Console) Info(v ...interface{})

func (*Console) Init

func (*Console) Init()

type File added in v1.0.5

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

func (*File) Debug added in v1.0.5

func (f *File) Debug(v ...interface{})

func (*File) Done added in v1.0.5

func (f *File) Done() bool

func (*File) Error added in v1.0.5

func (f *File) Error(v ...interface{})

func (*File) Fatal added in v1.0.5

func (f *File) Fatal(v ...interface{})

func (*File) Info added in v1.0.5

func (f *File) Info(v ...interface{})

func (*File) Init added in v1.0.5

func (f *File) Init()

type ILog

type ILog interface {
	Init()
	Done() bool
	Debug(v ...interface{})
	Info(v ...interface{})
	Error(v ...interface{})
	Fatal(v ...interface{})
}

func LogConsole added in v1.0.5

func LogConsole() ILog

func LogFile added in v1.0.5

func LogFile() ILog

type IOption added in v1.0.5

type IOption interface {
	// contains filtered or unexported methods
}

func EnableDivide added in v1.0.5

func EnableDivide() IOption

func EnableRotate added in v1.0.5

func EnableRotate() IOption

func FileKeep added in v1.0.5

func FileKeep(d int) IOption

func WithFile added in v1.0.5

func WithFile(file string) IOption

type LogConstruct added in v1.0.5

type LogConstruct func() ILog

type OptionFunc added in v1.0.5

type OptionFunc func(ILog)

Jump to

Keyboard shortcuts

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