logger

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PanicLevel 异常
	PanicLevel int = iota
	// FatalLevel 语法错误
	FatalLevel
	// ErrorLevel 错误
	ErrorLevel
	// WarnLevel 警告
	WarnLevel
	// InfoLevel 信息
	InfoLevel
	// DebugLevel 调试
	DebugLevel
)

Variables

This section is empty.

Functions

func Config

func Config(logFolder string, level int)

Config 配置

func Debug

func Debug(args ...interface{})

Debug Debug打印

func Debugf

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

Debugf Debug打印

func Error

func Error(args ...interface{})

Error 错误打印

func Errorf

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

Errorf 错误打印

func Fatal

func Fatal(args ...interface{})

Fatal 语法错误打印

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf 语法错误打印

func GetLevel

func GetLevel() int

GetLevel 取得Debug等级

func Info

func Info(args ...interface{})

Info 信息打印

func Infof

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

Infof 信息打印

func SetLevel

func SetLevel(level int)

SetLevel 设置打印等级

func Warn

func Warn(args ...interface{})

Warn 警告打印

func Warnf

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

Warnf 警告打印

Types

type LogFile

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

LogFile 日志结构

func (LogFile) Write

func (me LogFile) Write(buf []byte) (n int, err error)

Jump to

Keyboard shortcuts

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