glog

package module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: MIT Imports: 6 Imported by: 0

README

glog

mylog

对官方 log 库的功能增强型封装(主要添加一下染色功能)

可在第三方包里使用的日志库: 支持输出动态化配置

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

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

Debugf format print debug level log

func Debugln

func Debugln(v ...interface{})

Debugln println debug level log

func Errorf

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

Errorf format print error level log

func Errorln

func Errorln(v ...interface{})

Errorln println error level log

func Fatalf

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

Fatalf format print fatal level log

func Fatalln

func Fatalln(v ...interface{})

Fatalln println fatal level log

func Infof

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

Infof format print info level log

func Infoln

func Infoln(v ...interface{})

Infoln println info level log

func InitGlog

func InitGlog(wt io.Writer, flag int)

InitGlog func init package glog variable Gl, so can use like sqlmask.XX()

Types

type Glog added in v0.0.2

type Glog struct {
	*log.Logger
	// contains filtered or unexported fields
}

Glog a embed log.Logger struct type it for render log color

func GetGlog added in v0.0.6

func GetGlog() *Glog

func NewGlog added in v0.0.5

func NewGlog(wt io.Writer, flag int) *Glog

NewGlog func new a glog logger struct

func (*Glog) Debugf added in v0.0.3

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

Debugf format print debug level log

func (*Glog) Debugln added in v0.0.3

func (g *Glog) Debugln(v ...interface{})

Debugln println debug level log

func (*Glog) Errorf added in v0.0.3

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

Errorln println error level log

func (*Glog) Errorln added in v0.0.3

func (g *Glog) Errorln(v ...interface{})

Errorln println error level log

func (*Glog) Fatalf added in v0.0.3

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

Fatalf format print fatal level log

func (*Glog) Fatalln added in v0.0.3

func (g *Glog) Fatalln(v ...interface{})

Fatalln println fatal level log

func (*Glog) Infof added in v0.0.3

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

Infof format print info level log

func (*Glog) Infoln added in v0.0.3

func (g *Glog) Infoln(v ...interface{})

Infoln println info level log

Jump to

Keyboard shortcuts

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