Stdout

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	C_Kafka_Log_Topic      = "all-server-log-test2"
	C_Kafka_Log_User_Topic = "all-user-log-test2"
	LEVEL_FATA             = 1
	LEVEL_ERROR            = 2
	LEVEL_WARNING          = 3
	LEVEL_INFO             = 4
	LEVEL_DEBUG            = 6
)

日志等级

View Source
const (
	MODEL_PRO = iota
	MODEL_INFO
	MODEL_DEV
)

日志模式

Variables

This section is empty.

Functions

func ConfigESLogger

func ConfigESLogger(esUrl string, esHOst string, index string) error

func GetFunctionName

func GetFunctionName(i interface{}, seps ...rune) string

func Listen

func Listen(f interface{}, callback func(interface{}), param string)

安全执行监听函数

func OpenSendLog

func OpenSendLog(name string, open bool, elkAddress string)

func SetLogLevel

func SetLogLevel(lev logrus.Level)

设置日志等级

func SetLogModel

func SetLogModel(mod int) error

*设置日志模式 *参数说明: *@param:mod 模式 MODEL_PRO:只向日志服务器发送日志 MODEL_INFO:向日志服务器发送日志切输出到控制台 MODEL_DEV:只输出到控制台

func SetLogName

func SetLogName(name string)

func SetPathLvl

func SetPathLvl(lvl int)

func Test

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

func UserInfoLog

func UserInfoLog(userId int64, format string, args ...interface{})

Types

type Api_Stdout

type Api_Stdout struct{}

func (*Api_Stdout) Critical

func (*Api_Stdout) Critical(args ...interface{})

func (*Api_Stdout) Debug

func (*Api_Stdout) Debug(args ...interface{})

调试

func (*Api_Stdout) Debugf

func (*Api_Stdout) Debugf(format string, args ...interface{})

调试

func (*Api_Stdout) Error

func (*Api_Stdout) Error(args ...interface{})

错误

func (*Api_Stdout) Errorf

func (*Api_Stdout) Errorf(format string, args ...interface{})

错误

func (*Api_Stdout) Fatal

func (*Api_Stdout) Fatal(args ...interface{})

func (*Api_Stdout) Fatalf

func (*Api_Stdout) Fatalf(format string, args ...interface{})

错误

func (*Api_Stdout) Info

func (*Api_Stdout) Info(args ...interface{})

提示

func (*Api_Stdout) Infof

func (*Api_Stdout) Infof(format string, args ...interface{})

提示

func (*Api_Stdout) Notice

func (*Api_Stdout) Notice(args ...interface{})

func (*Api_Stdout) Panic

func (*Api_Stdout) Panic(args ...interface{})

func (*Api_Stdout) Panicf

func (*Api_Stdout) Panicf(format string, args ...interface{})

警告

func (*Api_Stdout) Trace

func (one *Api_Stdout) Trace() func()

计算函数所用时间

func (*Api_Stdout) TraceInfo

func (one *Api_Stdout) TraceInfo(str string) func()

计算函数所用时间

func (*Api_Stdout) TraceParam

func (one *Api_Stdout) TraceParam(param string) func()

计算函数所用时间

func (*Api_Stdout) Warn

func (*Api_Stdout) Warn(args ...interface{})

警告

func (*Api_Stdout) Warning

func (*Api_Stdout) Warning(args ...interface{})

警告

func (*Api_Stdout) Warningf

func (*Api_Stdout) Warningf(format string, args ...interface{})

警告

Jump to

Keyboard shortcuts

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