log

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: CC0-1.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger() *logrus.Logger

NewLogger creates a custome logger with environment hooks.

Types

type Service

type Service struct {
	Log *logrus.Logger
	// contains filtered or unexported fields
}

Service implementation of logging using `logrus`.

func (*Service) AddField

func (service *Service) AddField(name string, value interface{})

AddField will add a field using the name and value to the logger.

func (*Service) Debug

func (service *Service) Debug(message string, fields api.LogFields)

Debug outputs a debug message to the log.

func (*Service) DebugError

func (service *Service) DebugError(message string, err error, fields api.LogFields)

DebugError outputs a debug message and error to the log.

func (*Service) Fatal

func (service *Service) Fatal(message string, fields api.LogFields)

Fatal outputs a fatal message to the log.

func (*Service) FatalError

func (service *Service) FatalError(message string, err error, fields api.LogFields)

FatalError outputs a fatal message and error to the log.

func (*Service) Info

func (service *Service) Info(message string, fields api.LogFields)

Info outputs a informative message to the log.

func (*Service) InfoError

func (service *Service) InfoError(message string, err error, fields api.LogFields)

InfoError outputs a informative message and error to the log.

func (*Service) Panic

func (service *Service) Panic(message string, fields api.LogFields)

Panic outputs a panic message to the log.

func (*Service) PanicError

func (service *Service) PanicError(message string, err error, fields api.LogFields)

PanicError outputs a panic message and error to the log.

func (*Service) Print

func (service *Service) Print(message string, fields api.LogFields)

Print outputs a message to the log.

func (*Service) PrintError

func (service *Service) PrintError(message string, err error, fields api.LogFields)

PrintError outputs a message and error to the log.

func (*Service) Warn

func (service *Service) Warn(message string, fields api.LogFields)

Warn outputs a warning message to the log.

func (*Service) WarnError

func (service *Service) WarnError(message string, err error, fields api.LogFields)

WarnError outputs a warning message and error to the log.

Jump to

Keyboard shortcuts

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