logging

package
v1.2.27 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 20 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 logrus.Fields)

func GetJSONFileHook added in v1.1.3

func GetJSONFileHook(dir, file string) (logrus.Hook, error)

func MustGetFileHook added in v1.2.23

func MustGetFileHook(app string) logrus.Hook

Types

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, logrus.Fields, logrus.Level, string)
}

func DefaultLogWriter added in v1.2.15

func DefaultLogWriter() ILogWriter

func LogWriter added in v1.2.15

func LogWriter() ILogWriter

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 WithHook added in v1.1.0

func WithHook(hook logrus.Hook) Option

func WithLogOptions added in v1.1.0

func WithLogOptions(opts ...logOption) Option

Jump to

Keyboard shortcuts

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