logging

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 26 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 GetElasticHook added in v1.1.3

func GetElasticHook(app, url, accessKey, secretKey string) (logrus.Hook, error)

func GetJSONFileHook added in v1.1.3

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

absolute filename /home/bob/work/app.log

func Init added in v1.1.0

func Init(opts ...Option) (interfaces.IDotpeLogger, error)

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

Types

type FileLogConfig added in v1.0.17

type FileLogConfig struct {
	// contains filtered or unexported fields
}

func (*FileLogConfig) GetHook added in v1.1.3

func (flc *FileLogConfig) GetHook() (logrus.Hook, error)

type IHookContainer added in v1.1.3

type IHookContainer interface {
	GetHook() (logrus.Hook, error)
}

func NewElasticHookContainer added in v1.1.3

func NewElasticHookContainer(Client, AccessKey, SecretKey, APP, APPID string) IHookContainer

func NewFileHookContainer added in v1.1.3

func NewFileHookContainer(app string) IHookContainer

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

func WithHookContainer(hookContainer IHookContainer) 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