xlog

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 7 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(ctx context.Context, v ...interface{})

func Error

func Error(ctx context.Context, v ...interface{})

func Info

func Info(ctx context.Context, v ...interface{})

Types

type Logger

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

func New

func New(opt ...Option) *Logger

func (*Logger) Debug

func (l *Logger) Debug(ctx context.Context, v ...interface{})

func (*Logger) Error

func (l *Logger) Error(ctx context.Context, v ...interface{})

func (*Logger) Info

func (l *Logger) Info(ctx context.Context, v ...interface{})

func (*Logger) Printf added in v0.0.2

func (l *Logger) Printf(ctx context.Context, fmtStr string, v ...interface{})

Printf 实现 xmysql.Writer

func (*Logger) Println added in v0.0.2

func (l *Logger) Println(traceID string, types string, v ...interface{})

type Option

type Option func(logger *Logger)

func WithDebug added in v0.0.2

func WithDebug() Option

func WithFeishu

func WithFeishu(feishuUrl string) Option

func WithInfo

func WithInfo(serviceName, env string) Option

func WithTrace

func WithTrace(traceName string) Option

Jump to

Keyboard shortcuts

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