logging

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DPLogger

type DPLogger struct {
	Lops   LoggerOptions
	Logger *logrus.Logger
}

DPLogger ...

func InitLogger

func InitLogger(lops *LoggerOptions) (*DPLogger, error)

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

func (*DPLogger) GinLogger

func (dLogger *DPLogger) GinLogger() gin.HandlerFunc

GinLogger returns a gin.HandlerFunc middleware

func (*DPLogger) WriteLogs

func (dLogger *DPLogger) WriteLogs(ctx context.Context, fields logrus.Fields, cb logrus.Level, MessageKey string, args ...interface{})

WriteLogs writes log

type KibanaConfig

type KibanaConfig struct {
	Client,
	AccessKey,
	SecretKey,
	APPID,
	Hostname string
}

KibanaConfig Mandatory for kibana logging

type LoggerOptions

type LoggerOptions struct {
	KibanaConfig
	APP,
	APPID,
	LOGENV,
	WD string // Working directory of the application
	DisableJSONLogging bool
}

LoggerOptions is set of config data for logg

Jump to

Keyboard shortcuts

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