log

package
Version: v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLogger = &Log{}

Functions

This section is empty.

Types

type Log

type Log struct {
}

Log is just a dummy log tool that you can use. for more advenced usage please use Zap or Logrus.

func NewLogger

func NewLogger() *Log

func (*Log) Debug

func (l *Log) Debug(args ...interface{})

func (*Log) Debugf

func (l *Log) Debugf(template string, args ...interface{})

func (*Log) Error

func (l *Log) Error(args ...interface{})

func (*Log) Errorf

func (l *Log) Errorf(template string, args ...interface{})

func (*Log) Fatal

func (l *Log) Fatal(args ...interface{})

func (*Log) Fatalf

func (l *Log) Fatalf(template string, args ...interface{})

func (*Log) Warnf

func (l *Log) Warnf(template string, args ...interface{})

type Logger

type Logger interface {
	Debug(args ...interface{})
	Debugf(template string, args ...interface{})
	Error(args ...interface{})
	Errorf(template string, args ...interface{})
	Fatal(args ...interface{})
	Fatalf(template string, args ...interface{})
	Warnf(template string, args ...interface{})
}

Logger is an interface for using your own Logging tool like Zap or Logrus.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL