logger

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: AGPL-3.0 Imports: 13 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Name string
}

Options struct of plugin options

type Plugin

type Plugin struct {
	plugin.Plugin

	Options        *Options
	Configuration  configuration
	AppLogFile     *os.File
	RequestLogFile *os.File
	RequestLogger  *logrus.Logger
}

GORM plugin

func New

func New(options *Options) (*Plugin, error)

New plugin instance

func NewPlugin

func NewPlugin(options *Options, c plugin.Plugin) (*Plugin, error)

NewPlugin ...

func (*Plugin) Close

func (p *Plugin) Close() error

Close returns error if plugin can't destruct

func (*Plugin) GetConfiguration

func (p *Plugin) GetConfiguration() interface{}

GetConfiguration return configuration

func (*Plugin) GetLogWrapCaller

func (p *Plugin) GetLogWrapCaller(fn micro_client.CallFunc) micro_client.CallFunc

func (*Plugin) GetLogWrapHandler

func (p *Plugin) GetLogWrapHandler(fn micro_server.HandlerFunc) micro_server.HandlerFunc

implements the server.HandlerWrapper

func (*Plugin) GetName

func (p *Plugin) GetName() string

GetName return plugin name

func (*Plugin) GetVersion

func (p *Plugin) GetVersion() string

func (*Plugin) Init

func (p *Plugin) Init() error

Init plugin, run after configure

Jump to

Keyboard shortcuts

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