logger

package
v0.0.0-...-3cf0c3c Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 11 Imported by: 9

Documentation

Index

Constants

View Source
const (
	// TraceIDKey 跟踪ID
	TraceIDKey = "trace_id"
	// SpanIDKey 请求ID
	SpanIDKey = "span_id"
	// UserIDKey 用户ID
	UserIDKey = "user_id"
)
View Source
const (
	// XTraceIDKey ...
	XTraceIDKey = "X-Trace-Id"
	// XSpanIDKey ...
	XSpanIDKey = "X-Span-Id"
)

Variables

View Source
var (

	// Level 日志等级
	Level = "debug" // panic/fatal/error/warn/info/debug
)

Functions

func Debugf

func Debugf(format string, args ...interface{})

Debugf 测试

func Debugln

func Debugln(args ...interface{})

Debugln 测试

func Default

func Default() *logrus.Logger

Default 默认logger

func Errorf

func Errorf(format string, args ...interface{})

Errorf 错误

func Errorln

func Errorln(args ...interface{})

Errorln 错误

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf 致命

func Fatalln

func Fatalln(args ...interface{})

Fatalln 严重

func Infof

func Infof(format string, args ...interface{})

Infof 信息

func Infoln

func Infoln(args ...interface{})

Infoln 消息

func Init

func Init()

Init 初始化

func Panicln

func Panicln(args ...interface{})

Panicln 恐慌

func Printf

func Printf(format string, args ...interface{})

Printf 打印

func Println

func Println(args ...interface{})

Println 打印

func SetHookSentry

func SetHookSentry(client *raven.Client) error

SetHookSentry register sentry hook with a DSN key

func Warningf

func Warningf(format string, args ...interface{})

Warningf 警告

func Warningln

func Warningln(args ...interface{})

Warningln 警告

func Warnln

func Warnln(args ...interface{})

Warnln 警告

func WithGinContext

func WithGinContext(ctx *gin.Context) context.Context

WithGinContext ...

func WithGrpcMetadata

func WithGrpcMetadata(ctx context.Context) context.Context

WithGrpcMetadata 从上下文中

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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