logs

package
v0.0.0-...-58584ba Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContextOfLog

func GetContextOfLog() context.Context

GetContextOfLog 获取包含链路id 的 ctx

@return context.Context

Types

type Log

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

func NewLog

func NewLog() *Log

func (*Log) Debug

func (l *Log) Debug(ctx context.Context, format string, args ...interface{})

func (*Log) EnterExitFunc

func (l *Log) EnterExitFunc(ctx context.Context) func()

EnterExitFunc 打印函数进出日志:

    使用方法
	defer EnterExitFunc()()

func (*Log) Error

func (l *Log) Error(ctx context.Context, format string, args ...interface{})

func (*Log) Fatal

func (l *Log) Fatal(ctx context.Context, format string, args ...interface{})

func (*Log) Info

func (l *Log) Info(ctx context.Context, format string, args ...interface{})

func (*Log) Panic

func (l *Log) Panic(ctx context.Context, format string, args ...interface{})

func (*Log) SetTraceId

func (l *Log) SetTraceId(ctx context.Context) context.Context

func (*Log) Trace

func (l *Log) Trace(ctx context.Context, format string, args ...interface{})

func (*Log) Warning

func (l *Log) Warning(ctx context.Context, format string, args ...interface{})

Jump to

Keyboard shortcuts

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