logs

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

Debug Debug

func DebugLogger

func DebugLogger() *log.Logger

DebugLogger DebugLogger

func Debugf

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

Debugf Debugf

func Debugln

func Debugln(v ...interface{})

Debugln Debugln

func Error

func Error(v ...interface{})

Error Error

func ErrorLogger

func ErrorLogger() *log.Logger

ErrorLogger ErrorLogger

func Errorf

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

Errorf Errorf

func Errorln

func Errorln(v ...interface{})

Errorln Errorln

func Info

func Info(v ...interface{})

Info Info

func InfoLogger

func InfoLogger() *log.Logger

InfoLogger InfoLogger

func Infof

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

Infof Infof

func Infoln

func Infoln(v ...interface{})

Infoln Infoln

func Panicf

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

Panicf is equivalent to Printf() followed by a call to panic().

func Panicln

func Panicln(v ...interface{})

Panicln is equivalent to Println() followed by a call to panic().

func SetDebugPrefix

func SetDebugPrefix(prefix string)

SetDebugPrefix SetDebugPrefix

func SetErrorLogStackLevel added in v0.0.8

func SetErrorLogStackLevel(lv int)

SetErrorLogStackLevel 设置错误日志打印调用栈长度

func SetErrorPrefix

func SetErrorPrefix(prefix string)

SetErrorPrefix SetErrorPrefix

func SetInfoPrefix

func SetInfoPrefix(prefix string)

SetInfoPrefix SetInfoPrefix

func SetLoggerLevel

func SetLoggerLevel(lv LoggerLeve)

SetLoggerLevel NONE DEBUG INFO ERROR

func SetOutput

func SetOutput(w io.Writer)

SetOutput 设置输出-info, debug, error

Types

type LoggerLeve

type LoggerLeve int

LoggerLeve 日志级别 debug info error

const (
	// NONE NONE
	NONE LoggerLeve = 1 << iota
	// ERROR ERROR
	ERROR
	// INFO INFO
	INFO
	// DEBUG DEBUG
	DEBUG
)

Jump to

Keyboard shortcuts

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