tencent

package module
v0.0.0-...-c4dba0f Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

func NewLogger

func NewLogger(opts ...Option) *Logger

func (*Logger) Close

func (l *Logger) Close() error

Close 关闭日志服务

func (*Logger) Debug

func (l *Logger) Debug(a ...interface{})

Debug 打印调试日志

func (*Logger) Debugf

func (l *Logger) Debugf(format string, a ...interface{})

Debugf 打印调试模板日志

func (*Logger) Error

func (l *Logger) Error(a ...interface{})

Error 打印错误日志

func (*Logger) Errorf

func (l *Logger) Errorf(format string, a ...interface{})

Errorf 打印错误模板日志

func (*Logger) Fatal

func (l *Logger) Fatal(a ...interface{})

Fatal 打印致命错误日志

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, a ...interface{})

Fatalf 打印致命错误模板日志

func (*Logger) Info

func (l *Logger) Info(a ...interface{})

Info 打印信息日志

func (*Logger) Infof

func (l *Logger) Infof(format string, a ...interface{})

Infof 打印信息模板日志

func (*Logger) Panic

func (l *Logger) Panic(a ...interface{})

Panic 打印Panic日志

func (*Logger) Panicf

func (l *Logger) Panicf(format string, a ...interface{})

Panicf 打印Panic模板日志

func (*Logger) Producer

func (l *Logger) Producer() *cls.AsyncProducerClient

Producer 获取腾讯云Producer客户端

func (*Logger) Warn

func (l *Logger) Warn(a ...interface{})

Warn 打印警告日志

func (*Logger) Warnf

func (l *Logger) Warnf(format string, a ...interface{})

Warnf 打印警告模板日志

type Option

type Option func(o *options)

func WithAccessKeyID

func WithAccessKeyID(accessKeyID string) Option

WithAccessKeyID 设置访问密钥ID

func WithAccessKeySecret

func WithAccessKeySecret(accessKeySecret string) Option

WithAccessKeySecret 设置访问密钥密码

func WithCallerFullPath

func WithCallerFullPath(enable bool) Option

WithCallerFullPath 设置是否启用调用文件全路径

func WithCallerSkip

func WithCallerSkip(skip int) Option

WithCallerSkip 设置调用者跳过的层级深度

func WithEndpoint

func WithEndpoint(endpoint string) Option

WithEndpoint 设置端口

func WithLevel

func WithLevel(level log.Level) Option

WithLevel 设置输出的最低日志级别

func WithStackLevel

func WithStackLevel(level log.Level) Option

WithStackLevel 设置堆栈的最小输出级别

func WithStdout

func WithStdout(enable bool) Option

WithStdout 设置是否输出到终端

func WithSyncout

func WithSyncout(enable bool) Option

WithSyncout 设置是否同步输出到远端

func WithTimeFormat

func WithTimeFormat(format string) Option

WithTimeFormat 设置时间格式

func WithTopicID

func WithTopicID(topicID string) Option

WithTopicID 设置主题ID

Jump to

Keyboard shortcuts

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