log

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 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 `default:"warn"`
}

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
}

func NewLogger

func NewLogger(config *Config, versionReporter version.Reporter) (Logger, error)

type NullLogger

type NullLogger struct{}

func NewNullLogger

func NewNullLogger() *NullLogger

func (*NullLogger) Debug

func (n *NullLogger) Debug(message string)

func (*NullLogger) Error

func (n *NullLogger) Error(message string)

func (*NullLogger) Info

func (n *NullLogger) Info(message string)

func (*NullLogger) Warn

func (n *NullLogger) Warn(message string)

func (*NullLogger) WithError

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

func (*NullLogger) WithField

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

func (*NullLogger) WithFields

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

Jump to

Keyboard shortcuts

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