elog

package
v0.0.0-...-ceb20fc Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLevel = iota
	InfoLevel
	WarnLevel
	ErrorLevel
	PanicLevel
)

Variables

This section is empty.

Functions

func LogPanic

func LogPanic(err error)

func NewErrEmailFormat

func NewErrEmailFormat(email string) error

func NewErrLoginFail

func NewErrLoginFail(email string) error

func NewErrPasswordFormat

func NewErrPasswordFormat(password string) error

func NewErrPathNameIsExist

func NewErrPathNameIsExist(path string, name string) error

func NewErrPathNotDir

func NewErrPathNotDir(path string) error

func NewErrPathNotExist

func NewErrPathNotExist(path string) error

func NewErrPathNotFile

func NewErrPathNotFile(path string) error

func NewErrUnauthorized

func NewErrUnauthorized(path string) error

func NewErrUserEmailIsExist

func NewErrUserEmailIsExist(email string) error

func NewErrUserNameFormat

func NewErrUserNameFormat(userName string) error

func NewErrUserNameIsExist

func NewErrUserNameIsExist(name string) error

func Panic

func Panic(err error)

func WrapErr

func WrapErr(err error) error

Types

type Err

type Err interface {
	error
	GetLevel() (level int)
	Local() (file string, line int)
}

type Logger

type Logger struct {
	sync.Mutex
	sync.WaitGroup
	*os.File

	Level int
	// contains filtered or unexported fields
}

func (*Logger) Debug

func (log *Logger) Debug(args ...interface{})

func (*Logger) Destroy

func (log *Logger) Destroy()

Destroy log. Wait() is used to ensure that log output is complete.

func (*Logger) Err

func (log *Logger) Err(err error)

func (*Logger) Error

func (log *Logger) Error(args ...interface{})

func (*Logger) Info

func (log *Logger) Info(args ...interface{})

func (*Logger) Init

func (log *Logger) Init()

Initialization Logger.

func (*Logger) Maintain

func (log *Logger) Maintain()

Maintain log. Delete outdated log.

func (*Logger) Panic

func (log *Logger) Panic(args ...interface{})

func (*Logger) Warn

func (log *Logger) Warn(args ...interface{})

Jump to

Keyboard shortcuts

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