zlog

package module
v0.0.0-...-085dd90 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: MIT Imports: 5 Imported by: 2

README

zlog_golang

ZLOG 通过反射输出格式化日志

Documentation

Index

Constants

View Source
const (
	VERBOSE uint8 = iota /* 最详细的输出 */
	TRACE                /* 调试信息 */
	DEBUG                /* 函数进入退出信息 */
	INFO                 /* 服务启动关闭信息及请求访问信息 */
	WARNING              /* 异常警告信息(无需人工干预) */
	ERROR                /* 错误信息(不影响服务,需要人工干预) */
	FATAL                /* 崩溃信息(无法继续提供服务) */
	SILENCE
)

Variables

View Source
var LogLevelNames [8]string = [8]string{"VERBOSE", "TRACE", "DEBUG", "INFO", "WARNING", "ERROR", "FATAL", "SILENCE"}

Functions

func Debugf

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

func Debugln

func Debugln(v ...interface{})

func Errorf

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

func Errorln

func Errorln(v ...interface{})

func Fatalf

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

func Fatalln

func Fatalln(v ...interface{})

func Infof

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

func Infoln

func Infoln(v ...interface{})

func Logf

func Logf(level uint8, format string, v ...interface{})

func Logln

func Logln(level uint8, v ...interface{})

func SetLevel

func SetLevel(level uint8)

设置全局日志输出级别,低于该级别的日志不会输出

func SetTagLevel

func SetTagLevel(level uint8, tags ...string)

指定具体标志的日志级别,应小于全局级别 结合SetLevel,可以只输出指定标志的日志

func Tracef

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

func Traceln

func Traceln(v ...interface{})

func Verbosef

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

func Verboseln

func Verboseln(v ...interface{})

func Warningf

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

func Warningln

func Warningln(v ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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