log

package
v0.0.0-...-9f1a579 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoLogger

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

GoLogger implements Logger. It uses stdlib golang log under the hood.

func NewGoLogger

func NewGoLogger() *GoLogger

NewGoLogger constructs GoLogger which prints to stdout.

func (*GoLogger) Errorf

func (l *GoLogger) Errorf(arg0 string, args ...interface{})

Errorf implements Logger.Errorf. It adds `ERROR: ` prefix to all messages

func (*GoLogger) Tracef

func (l *GoLogger) Tracef(arg0 string, args ...interface{})

Tracef implements Logger.Tracef. It adds `TRACE: ` prefix to all messages

type Logger

type Logger interface {
	Errorf(arg0 string, args ...interface{})
	Tracef(arg0 string, args ...interface{})
}

Logger is an interface of some logger. TODO usually i would use struct logger. But it is much more complex abstraction which is out of scope for now.

type NoopLogger

type NoopLogger struct {
}

NoopLogger implements Logger. It do nothing.

func (NoopLogger) Errorf

func (NoopLogger) Errorf(arg0 string, args ...interface{})

Errorf implements Logger.Errorf.

func (NoopLogger) Tracef

func (NoopLogger) Tracef(arg0 string, args ...interface{})

Tracef implements Logger.Tracef.

Jump to

Keyboard shortcuts

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