logging

package
v1.2.29-betax10 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLogOptionRequestBody added in v1.1.0

func AccessLogOptionRequestBody(c *gin.Context, fields Fields)

Types

type Fields added in v1.2.29

type Fields map[string]interface{}

type IDotpeLogger added in v1.2.14

type IDotpeLogger interface {
	ILogWriter
	Gin() gin.HandlerFunc
}

ILogger ...

func MustGet added in v1.2.15

func MustGet(opts ...Option) IDotpeLogger

InitLogger sets up the logger object with LoggerOptions provided. It returns reference logger object and error

type ILogWriter added in v1.2.14

type ILogWriter interface {
	WriteLogs(context.Context, Fields, Level, string)
}

func DefaultLogWriter added in v1.2.15

func DefaultLogWriter() ILogWriter

func LogWriter added in v1.2.15

func LogWriter() ILogWriter

type Level added in v1.2.29

type Level zapcore.Level
const (
	PanicLevel  Level = Level(zap.PanicLevel)
	FatalLevel  Level = Level(zap.FatalLevel)
	ErrorLevel  Level = Level(zap.ErrorLevel)
	WarnLevel   Level = Level(zap.WarnLevel)
	InfoLevel   Level = Level(zap.InfoLevel)
	DebugLevel  Level = Level(zap.DebugLevel)
	DPanicLevel Level = Level(zap.DPanicLevel)
)

func (Level) String added in v1.2.29

func (l Level) String() string

type Option added in v1.1.0

type Option func(dlogger *dlogger)

func WithAccessLogOptions added in v1.1.0

func WithAccessLogOptions(opts ...accessLogOption) Option

func WithAppInfo added in v1.1.0

func WithAppInfo(app string) Option

func WithLogOptions added in v1.1.0

func WithLogOptions(opts ...logOption) Option

func WithMetric added in v1.2.29

func WithMetric(level Level) Option

Jump to

Keyboard shortcuts

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