logger

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LoggerKey
	LoggerKey = "service"
	// LoggerValue
	LoggerValue = "gigamock"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ILocalLogger

type ILocalLogger interface {
	Writers() []io.Writer
	Logger() *logrus.Entry
	SetLogger(logger *logrus.Entry)
	Init(level string, prettyPrint bool) error
}

ILocalLogger is interface for inheritance of structure

type LocalLogger

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

LocalLogger is wrapper of logrus logger

func NewLocalLogger

func NewLocalLogger(writers []io.Writer) *LocalLogger

func (*LocalLogger) Init

func (l *LocalLogger) Init(level string, prettyPrint bool) error

Init is initializer of local logger

func (*LocalLogger) Logger

func (l *LocalLogger) Logger() *logrus.Entry

Logger is getter of logrus logger

func (*LocalLogger) SetLogger

func (l *LocalLogger) SetLogger(logger *logrus.Entry)

SetLogger is setter of logrus logger

func (*LocalLogger) Writers

func (l *LocalLogger) Writers() []io.Writer

Writers is getter of io writers slice

Jump to

Keyboard shortcuts

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