logger

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *zap.Logger

Functions

func Debug

func Debug(v ...interface{})

func Debugf added in v0.0.2

func Debugf(format string, v ...interface{})

func Error

func Error(v ...interface{})

func Errorf added in v0.0.2

func Errorf(format string, v ...interface{})

func Info

func Info(v ...interface{})

func Infof added in v0.0.2

func Infof(format string, v ...interface{})

func InitLog added in v0.0.2

func InitLog(c Config)

func InitLogger

func InitLogger()

func Panic added in v0.0.2

func Panic(v ...interface{})

func Panicf added in v0.0.2

func Panicf(format string, v ...interface{})

func Warn

func Warn(v ...interface{})

func Warnf added in v0.0.2

func Warnf(format string, v ...interface{})

Types

type Config added in v0.0.2

type Config struct {
	Level    string `json:",default=info,options=debug|info|warn|error|panic|fatal"`
	FileName string `json:",optional"`
	LogType  string `json:",default=logrus,options=logrus|zap,optional"`
}

type ILog added in v0.0.2

type ILog interface {
	Info(v ...interface{})
	Infof(format string, v ...interface{})
	Error(v ...interface{})
	Errorf(format string, v ...interface{})
	Panic(v ...interface{})
	Panicf(format string, v ...interface{})
	Warn(v ...interface{})
	Warnf(format string, v ...interface{})
	Debug(v ...interface{})
	Debugf(format string, v ...interface{})
}

type LogLevel added in v0.0.2

type LogLevel int
const (
	LevelFatal LogLevel = 1
	LevelPanic LogLevel = 2
	LevelError LogLevel = 3
	LevelWarn  LogLevel = 4
	LevelInfo  LogLevel = 5
	LevelDebug LogLevel = 6
)

Jump to

Keyboard shortcuts

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