logger

package
v0.1.4-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileLogger

func NewFileLogger(filePath string) *logger

NewStdLogger output log to a file

func NewStdLogger

func NewStdLogger() *logger

NewStdLogger output log to command line

Types

type LogLevel

type LogLevel int
const (
	LevelInfo LogLevel = iota + 1
	LevelWarn
	LevelError
	LevelFatal
)

type Logger

type Logger interface {
	Infof(string, ...interface{})
	Warnf(string, ...interface{})
	Errorf(string, ...interface{})
	Fatalf(string, ...interface{})
}

Interface logger interface

Jump to

Keyboard shortcuts

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