log

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsoleLogger

type ConsoleLogger struct {
	Errors bool
	Infos  bool
	Warns  bool
}

2020-05-03 12:39:45.001 ERROR [Server@192.168.0.1:666] Failed to connect 2020-05-03 12:39:45.001 INFO [Server@192.168.0.1:666] Custom message 2020-05-03 12:39:45.001 WARN [Server@192.168.0.1:666] Custom message

func (*ConsoleLogger) Debugf

func (l *ConsoleLogger) Debugf(id string, msg string, args ...interface{})

func (*ConsoleLogger) Error

func (l *ConsoleLogger) Error(id string, err error)

func (*ConsoleLogger) Errorf

func (l *ConsoleLogger) Errorf(id string, msg string, args ...interface{})

func (*ConsoleLogger) Infof

func (l *ConsoleLogger) Infof(id string, msg string, args ...interface{})

func (*ConsoleLogger) Warnf

func (l *ConsoleLogger) Warnf(id string, msg string, args ...interface{})

type Logger

type Logger interface {
	Error(componentId string, err error)
	Errorf(componentId string, msg string, args ...interface{})
	Warnf(componentId string, msg string, args ...interface{})
	Infof(componentId string, msg string, args ...interface{})
	Debugf(componentId string, msg string, args ...interface{})
}

Logger interface used by internal packages

type VoidLogger

type VoidLogger struct{}

func (VoidLogger) Debugf

func (l VoidLogger) Debugf(id string, msg string, args ...interface{})

func (VoidLogger) Error

func (l VoidLogger) Error(id string, err error)

func (VoidLogger) Errorf

func (l VoidLogger) Errorf(id string, msg string, args ...interface{})

func (VoidLogger) Infof

func (l VoidLogger) Infof(id string, msg string, args ...interface{})

func (VoidLogger) Warnf

func (l VoidLogger) Warnf(id string, msg string, args ...interface{})

Jump to

Keyboard shortcuts

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