zap

package
v2.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: OSL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

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

Module for logrus logging

func (*Module) Configure

func (m *Module) Configure(injector *dingo.Injector)

Configure the logrus logger as flamingo.Logger (in JSON mode kibana compatible)

func (*Module) DefaultConfig

func (m *Module) DefaultConfig() config.Map

func (*Module) Inject

func (m *Module) Inject(config *struct {
	Area               string  `inject:"config:area"`
	JSON               bool    `inject:"config:zap.json,optional"`
	LogLevel           string  `inject:"config:zap.loglevel,optional"`
	ColoredOutput      bool    `inject:"config:zap.colored,optional"`
	DevelopmentMode    bool    `inject:"config:zap.devmode,optional"`
	SamplingEnabled    bool    `inject:"config:zap.sampling.enabled,optional"`
	SamplingInitial    float32 `inject:"config:zap.sampling.initial,optional"`
	SamplingThereafter float32 `inject:"config:zap.sampling.thereafter,optional"`
})

type ShutdownEventSubscriber

type ShutdownEventSubscriber struct {
	Logger flamingo.Logger `inject:""`
}

ShutdownEventSubscriber handles the logger sync on flamingo shutdown

func (*ShutdownEventSubscriber) Notify

func (subscriber *ShutdownEventSubscriber) Notify(event event.Event)

Notify handles the incoming event if it is a AppShutdownEvent

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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