logger

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ExternalConfigName = "logger"

ExternalConfigName is the external config name of logger.

Variables

This section is empty.

Functions

func Level

func Level(level log.Level) nirvana.Configurer

Level Configurer set a new StdLogger with specified log level.

Types

type Option

type Option struct {
	// Debug is logger level.
	Debug bool `desc:"Debug mode. Output all logs"`
	// Level is logger level.
	Level int32 `desc:"Log level. This field is no sense if debug is enabled"`
	// OverrideGlobal modifies nirvana global logger.
	OverrideGlobal bool `desc:"Override global logger"`
}

Option contains basic configurations of logger.

func NewDefaultOption added in v0.2.0

func NewDefaultOption() *Option

NewDefaultOption creates default option.

func (*Option) Configure

func (p *Option) Configure(cfg *nirvana.Config) error

Configure configures nirvana config via current options.

func (*Option) Name

func (p *Option) Name() string

Name returns plugin name.

Jump to

Keyboard shortcuts

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