log

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartStackdriver

func StartStackdriver()

Types

type Fields

type Fields map[string]interface{}

type Level

type Level uint8
const (
	LevelInfo Level = iota
)

type Logger

type Logger interface {
	Info(args ...interface{})
	Infof(format string, args ...interface{})
	Debug(args ...interface{})
	Debugf(format string, args ...interface{})
	Warning(args ...interface{})
	Warningf(format string, args ...interface{})
	Error(args ...interface{})
	Errorf(format string, args ...interface{})
	Panic(args ...interface{})
	Panicf(format string, args ...interface{})
	WithField(key string, value interface{}) Logger
	Fields() Fields
}

type Logrus

type Logrus struct {
	*logrus.Entry
}

func NewLogrus

func NewLogrus(logger *logrus.Logger) *Logrus

func (*Logrus) Fields

func (l *Logrus) Fields() Fields

func (*Logrus) WithField

func (l *Logrus) WithField(key string, value interface{}) Logger

type LogrusOptions

type LogrusOptions struct {
}

type Severity

type Severity uint8
const (
	Debug Severity = iota
	Info
	Warning
	Error
	Panic
)

type Stackdriver

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

func NewStackdriver

func NewStackdriver(opts *StackdriverOptions) *Stackdriver

func (*Stackdriver) Debug

func (s *Stackdriver) Debug(args ...interface{})

func (*Stackdriver) Debugf

func (s *Stackdriver) Debugf(format string, args ...interface{})

func (*Stackdriver) Error

func (s *Stackdriver) Error(args ...interface{})

func (*Stackdriver) Errorf

func (s *Stackdriver) Errorf(format string, args ...interface{})

func (*Stackdriver) Fields

func (s *Stackdriver) Fields() Fields

func (*Stackdriver) Info

func (s *Stackdriver) Info(args ...interface{})

func (*Stackdriver) Infof

func (s *Stackdriver) Infof(format string, args ...interface{})

func (*Stackdriver) Panic

func (s *Stackdriver) Panic(args ...interface{})

func (*Stackdriver) Panicf

func (s *Stackdriver) Panicf(format string, args ...interface{})

func (*Stackdriver) Warning

func (s *Stackdriver) Warning(args ...interface{})

func (*Stackdriver) Warningf

func (s *Stackdriver) Warningf(format string, args ...interface{})

func (*Stackdriver) WithField

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

type StackdriverOptions

type StackdriverOptions struct {
	LogName  string
	Severity Severity
}

Jump to

Keyboard shortcuts

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