log

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2016 License: BSD-3-Clause Imports: 7 Imported by: 46

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Level string `json:"level" default:"warn"`
}

func (*Config) Clone added in v0.1.0

func (c *Config) Clone() *Config

func (*Config) Validate

func (c *Config) Validate() error

type Fields

type Fields map[string]interface{}

type Logger

type Logger interface {
	Debug(message string)
	Info(message string)
	Warn(message string)
	Error(message string)

	WithError(err error) Logger
	WithField(key string, value interface{}) Logger
	WithFields(fields Fields) Logger
}

type Null added in v0.1.0

type Null struct{}

func NewNull added in v0.1.0

func NewNull() *Null

func (*Null) Debug added in v0.1.0

func (n *Null) Debug(message string)

func (*Null) Error added in v0.1.0

func (n *Null) Error(message string)

func (*Null) Info added in v0.1.0

func (n *Null) Info(message string)

func (*Null) Warn added in v0.1.0

func (n *Null) Warn(message string)

func (*Null) WithError added in v0.1.0

func (n *Null) WithError(err error) Logger

func (*Null) WithField added in v0.1.0

func (n *Null) WithField(key string, value interface{}) Logger

func (*Null) WithFields added in v0.1.0

func (n *Null) WithFields(fields Fields) Logger

type Standard added in v0.1.0

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

func NewStandard added in v0.1.0

func NewStandard(versionReporter version.Reporter, config *Config) (*Standard, error)

func (*Standard) Debug added in v0.1.0

func (s *Standard) Debug(message string)

func (*Standard) Error added in v0.1.0

func (s *Standard) Error(message string)

func (*Standard) Info added in v0.1.0

func (s *Standard) Info(message string)

func (*Standard) Warn added in v0.1.0

func (s *Standard) Warn(message string)

func (*Standard) WithError added in v0.1.0

func (s *Standard) WithError(err error) Logger

func (*Standard) WithField added in v0.1.0

func (s *Standard) WithField(key string, value interface{}) Logger

func (*Standard) WithFields added in v0.1.0

func (s *Standard) WithFields(fields Fields) Logger

Jump to

Keyboard shortcuts

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