tlog

package module
v0.0.0-...-464fe19 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 4 Imported by: 1

README

介绍

集成CLS的上报组件

参考链接

  1. CLS可用地域
  2. tencentcloud-cls-sdk-go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	SecretID  string `json:"SecretID"`
	SecretKey string `json:"SecretKey"`
}

Credential is the ticket for accessing the log service at QCloud

type Option

type Option func(*Options)

func WithEndpoint

func WithEndpoint(endpoint string) Option

type Options

type Options struct {
	// contains filtered or unexported fields
}

type TLog

type TLog struct {
	// contains filtered or unexported fields
}

func New

func New(topic string, credential Credential, opts ...Option) *TLog

func (*TLog) Establish

func (t *TLog) Establish() error

func (TLog) Fire

func (t TLog) Fire(entry *logrus.Entry) error

func (TLog) Levels

func (t TLog) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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