sls

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close 关闭日志服务

func Error

func Error(topic string, logs map[string]string) error

Error 记录异常日志

func Info

func Info(topic string, logs map[string]string) error

Info 记录info日志

func InitLog

func InitLog(configName, LogStore string)

InitLog 初始化日志

func SetGLog

func SetGLog()

将glog设置为输出到阿里云

Types

type AliyunLog

type AliyunLog struct {
	AccessKey string
	SecretKey string
	Endpoint  string
	Project   string
	LogStore  string
	HostName  string
	Log       *producer.Producer
}

AliyunLog 阿里云日志配置结构体

var LogClient AliyunLog

LogClient 对外原生实例

func (*AliyunLog) Debug

func (aLog *AliyunLog) Debug(args ...interface{})

func (*AliyunLog) DebugF

func (aLog *AliyunLog) DebugF(format string, args ...interface{})

func (*AliyunLog) Error

func (aLog *AliyunLog) Error(args ...interface{})

func (*AliyunLog) ErrorF

func (aLog *AliyunLog) ErrorF(format string, args ...interface{})

func (*AliyunLog) Info

func (aLog *AliyunLog) Info(args ...interface{})

func (*AliyunLog) InfoF

func (aLog *AliyunLog) InfoF(format string, args ...interface{})

func (*AliyunLog) Warn

func (aLog *AliyunLog) Warn(args ...interface{})

func (*AliyunLog) WarnF

func (aLog *AliyunLog) WarnF(format string, args ...interface{})

Jump to

Keyboard shortcuts

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