log

package module
v0.0.0-...-da49796 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: MIT Imports: 1 Imported by: 0

README

glog

GitHub License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, args ...interface{})

普通日志

func Debugf

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

其他日志 如:HTTP RPC日志

func Error

func Error(msg string, args ...interface{})

func Errorf

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

func Fatal

func Fatal(msg string, args ...interface{})

func Fatalf

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

func Info

func Info(msg string, args ...interface{})

func Infof

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

func Panic

func Panic(msg string, args ...interface{})

func Panicf

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

func SetLevel

func SetLevel(level string)

func SetLogger

func SetLogger(logger Logger)

func Warn

func Warn(msg string, args ...interface{})

func Warnf

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

Types

type Logger

type Logger interface {
	//普通日志,如果有args,需要格式化
	Debug(string, ...interface{})
	Info(string, ...interface{})
	Warn(string, ...interface{})
	Error(string, ...interface{})
	Panic(string, ...interface{})
	Fatal(string, ...interface{})
	//需要格式化日志 ,最后一个是context
	Debugf(string, ...interface{})
	Infof(string, ...interface{})
	Warnf(string, ...interface{})
	Errorf(string, ...interface{})
	Panicf(string, ...interface{})
	Fatalf(string, ...interface{})
	SetLevel(string)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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