glog

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(a ...interface{})

Debug level debug

func Debugf

func Debugf(msg string, a ...interface{})

Debugf level debug

func Error

func Error(a ...interface{})

Error 记录错误信息

func ErrorString

func ErrorString(a ...interface{})

ErrorString 打印错误信息

func Errorf

func Errorf(msg string, a ...interface{})

Errorf 记录错误信息

func Fatal

func Fatal(a ...interface{})

Fatal level fatal

func Fatalf

func Fatalf(msg string, a ...interface{})

Fatalf level fatal

func GetDefaultStd

func GetDefaultStd() *stdLog

GetDefaultStd get default std logger

func GetDefaultZap

func GetDefaultZap() *zapLog

GetDefaultZap 获取默认zap日志库

func Info

func Info(a ...interface{})

Info info level debug

func Infof

func Infof(msg string, a ...interface{})

Infof info level debug

func JSON

func JSON(a ...interface{})

JSON json info

func Panic

func Panic(a ...interface{})

Panic return trace of error

func SaveError

func SaveError(errstring, flag string)

SaveError return trace of error

func SetLog

func SetLog(log ILog)

SetLog set log

func TraceError

func TraceError(err error) error

TraceError return trace of error

Types

type ILog

type ILog interface {
	Debug(a ...interface{})
	Debugf(msg string, a ...interface{})
	Info(a ...interface{})
	Infof(msg string, a ...interface{})
	Error(a ...interface{})
	Errorf(msg string, a ...interface{})
	ErrorString(a ...interface{})        // ErrorString 打印错误信息(不记录错误文件)
	Fatal(v ...interface{})              // 系统级错误,退出
	Fatalf(msg string, a ...interface{}) // 系统级错误,退出
	SaveError(errstring, flag string)
	Panic(a ...interface{})
	JSON(a ...interface{})
	TraceError(err error) error
	Close()
}

Jump to

Keyboard shortcuts

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