logger

package
v0.0.0-...-c780586 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: GPL-2.0 Imports: 3 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
}

Logger 日志对象

func New

func New(category string) *Logger

New 创建一个新的日志对象

func (Logger) CtxError

func (log Logger) CtxError(ctx context.Context, msg string, keysAndValues ...interface{})

CtxError 带上下文的错误打印

func (Logger) CtxInfo

func (log Logger) CtxInfo(ctx context.Context, msg string, keysAndValues ...interface{})

CtxInfo 带上下文的提示信息打印

func (Logger) Error

func (log Logger) Error(msg string, keysAndValues ...interface{})

Error 错误信息打印

func (Logger) Info

func (log Logger) Info(msg string, keysAndValues ...interface{})

Info 提示信息打印

func (*Logger) WithContext

func (log *Logger) WithContext(ctx context.Context) *Logger

WithContext 加入上下文

Jump to

Keyboard shortcuts

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