logger

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLogField

func AddLogField(ctx context.Context, key string, value interface{}) context.Context

AddLogField add more log field to context

func Ctx

func Ctx(ctx context.Context) *logrus.Entry

Ctx get logrus entry from context

func Debug added in v1.0.2

func Debug(content ...interface{})

Debug log panic

func Error added in v1.0.2

func Error(content ...interface{})

Error log panic

func Fatal added in v1.0.2

func Fatal(content ...interface{})

Fatal log panic

func Info added in v1.0.2

func Info(content ...interface{})

Info log panic

func LogDebug

func LogDebug(ctx context.Context, content interface{})

LogDebug for logging debug with context to log request_id and correlation_id

func LogDebugf

func LogDebugf(ctx context.Context, format string, a ...any)

LogDebugf for logging debug with context to log request_id and correlation_id

func LogError

func LogError(ctx context.Context, content interface{})

LogError for logging errors with context to log request_id and correlation_id

func LogErrorf

func LogErrorf(ctx context.Context, format string, a ...any)

LogErrorf for logging errors with context to log request_id and correlation_id

func LogInfo

func LogInfo(ctx context.Context, content interface{})

LogInfo for logging info with context to log request_id and correlation_id

func LogInfof

func LogInfof(ctx context.Context, format string, a ...any)

LogInfof for logging info with context to log request_id and correlation_id

func LogRequest added in v1.0.2

func LogRequest(ctx context.Context, content interface{})

LogRequest for logging request of api with request_id and correlation_id

func LogResponse added in v1.0.2

func LogResponse(ctx context.Context, content interface{})

LogResponse for logging respone of api with request_id and correlation_id

func LogWarn

func LogWarn(ctx context.Context, content interface{})

LogWarn for logging warn with context to log request_id and correlation_id

func LogWarnf

func LogWarnf(ctx context.Context, format string, a ...any)

LogWarnf for logging warn with context to log request_id and correlation_id

func LogWithContext

func LogWithContext(ctx context.Context, content ...interface{})

LogWithContext log content with context content[0] : message -> interface{}, content[1] : log type -> string, content[2] : log field -> map[string]interface{}

func Panic added in v1.0.2

func Panic(content ...interface{})

Panic log panic

func Trace added in v1.0.2

func Trace(content ...interface{})

Trace log panic

func Warn added in v1.0.2

func Warn(content ...interface{})

Warn log panic

Types

This section is empty.

Jump to

Keyboard shortcuts

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