log

package
v2.0.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultLogger

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

DefaultLogger is the logger used when no other is specified.

func NewDefaultLogger

func NewDefaultLogger() *DefaultLogger

NewDefaultLogger creates the default logger with settings found in the process environment.

func (*DefaultLogger) Begin

func (dl *DefaultLogger) Begin(ctx context.Context, f string)

Begin writes a default log at the begining of a function.

func (*DefaultLogger) Errorf

func (dl *DefaultLogger) Errorf(ctx context.Context, s string, args ...interface{})

Errorf is used for logging at info level.

func (*DefaultLogger) Infof

func (dl *DefaultLogger) Infof(ctx context.Context, s string, args ...interface{})

Infof is used for logging at info level.

func (*DefaultLogger) Warningf

func (dl *DefaultLogger) Warningf(ctx context.Context, s string, args ...interface{})

Warningf is used for logging at info level.

type Logger

type Logger interface {
	Begin(ctx context.Context, f string)
	Infof(ctx context.Context, s string, args ...interface{})
	Warningf(ctx context.Context, s string, args ...interface{})
	Errorf(ctx context.Context, s string, args ...interface{})
}

Logger defines all methods required by an logger.

Jump to

Keyboard shortcuts

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