native

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: MIT Imports: 10 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultFieldsKeySpec       = NewFieldsKeySpec()
	DefaultFieldsKeySpecFacade = NewFieldsKeySpecFacade(func() FieldsKeysSpec {
		return DefaultFieldsKeySpec
	})
)
View Source
var DefaultProvider = NewProvider("native")

Functions

This section is empty.

Types

type CoreLogger

type CoreLogger struct {
	Level           *log.Level
	Consumer        consumer.Consumer
	LocationFactory location.Factory
	// contains filtered or unexported fields
}

func (*CoreLogger) GetConsumer

func (instance *CoreLogger) GetConsumer() consumer.Consumer

func (*CoreLogger) GetLevel

func (instance *CoreLogger) GetLevel() log.Level

func (*CoreLogger) GetLocationFactory added in v0.1.5

func (instance *CoreLogger) GetLocationFactory() location.Factory

func (*CoreLogger) GetName

func (instance *CoreLogger) GetName() string

func (*CoreLogger) GetProvider

func (instance *CoreLogger) GetProvider() log.Provider

func (*CoreLogger) IsLevelEnabled

func (instance *CoreLogger) IsLevelEnabled(level log.Level) bool

func (*CoreLogger) Log added in v0.3.0

func (instance *CoreLogger) Log(event log.Event)

func (*CoreLogger) SetConsumer

func (instance *CoreLogger) SetConsumer(v consumer.Consumer)

func (*CoreLogger) SetLevel

func (instance *CoreLogger) SetLevel(level log.Level)

func (*CoreLogger) SetLocationFactory added in v0.1.5

func (instance *CoreLogger) SetLocationFactory(v location.Factory)

type FieldsKeySpecImpl added in v0.1.5

type FieldsKeySpecImpl struct {
	Timestamp string
	Message   string
	Logger    string
	Error     string
	Location  string
}

func (*FieldsKeySpecImpl) GetError added in v0.1.5

func (instance *FieldsKeySpecImpl) GetError() string

func (*FieldsKeySpecImpl) GetLocation added in v0.1.5

func (instance *FieldsKeySpecImpl) GetLocation() string

func (*FieldsKeySpecImpl) GetLogger added in v0.1.5

func (instance *FieldsKeySpecImpl) GetLogger() string

func (*FieldsKeySpecImpl) GetMessage added in v0.4.0

func (instance *FieldsKeySpecImpl) GetMessage() string

func (*FieldsKeySpecImpl) GetTimestamp added in v0.4.0

func (instance *FieldsKeySpecImpl) GetTimestamp() string

type FieldsKeysSpec added in v0.1.5

type FieldsKeysSpec interface {
	fields.KeysSpec
	GetLocation() string
}

func NewFieldsKeySpec added in v0.1.5

func NewFieldsKeySpec() FieldsKeysSpec

func NewFieldsKeySpecFacade added in v0.5.0

func NewFieldsKeySpecFacade(provider func() FieldsKeysSpec) FieldsKeysSpec

type Provider

type Provider struct {
	Cache log.LoggerCache
	Name  string

	Level         log.Level
	LevelNames    level.Names
	LevelProvider log.LevelProvider

	Formatter       formatter.Formatter
	Interceptor     interceptor.Interceptor
	Consumer        consumer.Consumer
	LocationFactory location.Factory
	FieldsKeysSpec  FieldsKeysSpec
}

func NewProvider

func NewProvider(name string) *Provider

func (*Provider) GetAllLevels added in v0.4.0

func (instance *Provider) GetAllLevels() []log.Level

func (*Provider) GetConsumer

func (instance *Provider) GetConsumer() consumer.Consumer

func (*Provider) GetFieldKeySpec added in v0.1.5

func (instance *Provider) GetFieldKeySpec() fields.KeysSpec

func (*Provider) GetFormatter

func (instance *Provider) GetFormatter() formatter.Formatter

func (*Provider) GetInterceptor

func (instance *Provider) GetInterceptor() interceptor.Interceptor

func (*Provider) GetLevel

func (instance *Provider) GetLevel() log.Level

func (*Provider) GetLevelNames added in v0.3.0

func (instance *Provider) GetLevelNames() level.Names

func (*Provider) GetLocationFactory added in v0.1.5

func (instance *Provider) GetLocationFactory() location.Factory

func (*Provider) GetLogger added in v0.4.0

func (instance *Provider) GetLogger(name string) log.Logger

func (*Provider) GetName added in v0.4.0

func (instance *Provider) GetName() string

func (*Provider) SetConsumer

func (instance *Provider) SetConsumer(v consumer.Consumer)

func (*Provider) SetFormatter

func (instance *Provider) SetFormatter(v formatter.Formatter)

func (*Provider) SetInterceptor

func (instance *Provider) SetInterceptor(v interceptor.Interceptor)

func (*Provider) SetLevel

func (instance *Provider) SetLevel(level log.Level)

func (*Provider) SetLocationFactory added in v0.1.5

func (instance *Provider) SetLocationFactory(v location.Factory)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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