log

package
v0.0.0-...-927e444 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(format string, args ...interface{})

func Error

func Error(format string, args ...interface{})

func Flush

func Flush()

func Info

func Info(format string, args ...interface{})

func IsDebugEnabled

func IsDebugEnabled() bool

func IsInfoEnabled

func IsInfoEnabled() bool

func IsWarnEnabled

func IsWarnEnabled() bool

func Regist

func Regist(log Log)

func RegistLog

func RegistLog(i uint8, l Log) error

func RemoveLogI

func RemoveLogI(i uint8)

func SetLogLevel

func SetLogLevel(level string)

func Warn

func Warn(format string, args ...interface{})

Types

type GoLog

type GoLog struct {
	*golog.Logger
	L         Level
	LevelCode string
}

func (*GoLog) Debug

func (this *GoLog) Debug(format string, args ...interface{})

func (*GoLog) Error

func (this *GoLog) Error(format string, args ...interface{})

func (*GoLog) Flush

func (this *GoLog) Flush()

func (*GoLog) Info

func (this *GoLog) Info(format string, args ...interface{})

func (*GoLog) IsDebugEnabled

func (this *GoLog) IsDebugEnabled() bool

func (*GoLog) IsInfoEnabled

func (this *GoLog) IsInfoEnabled() bool

func (*GoLog) IsWarnEnabled

func (this *GoLog) IsWarnEnabled() bool

func (*GoLog) SetLogLevel

func (this *GoLog) SetLogLevel(levelStr string)

func (*GoLog) Warn

func (this *GoLog) Warn(format string, args ...interface{})

type Level

type Level int8
const (
	DEBUG Level = iota
	INFO
	WARN
	ERROR
)

type Log

type Log interface {
	IsDebugEnabled() bool

	IsInfoEnabled() bool

	IsWarnEnabled() bool

	Error(format string, args ...interface{})

	Info(format string, args ...interface{})

	Debug(format string, args ...interface{})

	Warn(format string, args ...interface{})

	//when system exit you should use it
	Flush()

	SetLogLevel(levelStr string)
}

func Get

func Get() Log

func GetLog

func GetLog(i int) Log

func GetrDef

func GetrDef(i int) Log

func NewGoLog

func NewGoLog(lg *golog.Logger, l Level) Log

Jump to

Keyboard shortcuts

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