alog

package
v1.0.35 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidParam = errors.New("config Missing parameter")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	Config   *Config
	Producer *producer.Producer
}

func New

func New(config *Config) (client *Client, err error)

初始化日志

func (*Client) Close

func (c *Client) Close()

Close 关闭日志服务

func (*Client) Record

func (c *Client) Record(level string, topic string, logs map[string]string) error

Record publish log to sls record

type Config

type Config struct {
	AccessKey string
	SecretKey string
	Endpoint  string
	Project   string
	LogStore  string
	HostName  string
}

阿里云日志配置结构体

Jump to

Keyboard shortcuts

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