clog

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ColorBlack  = black
	ColorRed    = red
	ColorGreen  = green
	ColorYellow = yellow
	ColorBlue   = blue
	ColorPink   = pink
	ColorCyan   = cyan
	ColorGray   = gray
	ColorOrange = orange
)
View Source
const Name = "clog"

Variables

This section is empty.

Functions

func BluePrintf

func BluePrintf(str string, v ...any)

func BluePrintln

func BluePrintln(output ...any)

蓝色

func BlueSprintf

func BlueSprintf(str any, rest ...string) string

func BrownPrintf

func BrownPrintf(str string, v ...any)

func BrownPrintln

func BrownPrintln(output ...any)

棕色

func BrownSprintf

func BrownSprintf(str any, rest ...string) string

func CyanPrintf

func CyanPrintf(str string, v ...any)

func CyanPrintln

func CyanPrintln(output ...any)

青色

func CyanSprintf

func CyanSprintf(str any, rest ...string) string

func GreenPrintf

func GreenPrintf(str string, v ...any)

func GreenPrintln

func GreenPrintln(output ...any)

绿色

func GreenSprintf

func GreenSprintf(str any, rest ...string) string

func OrangePrintf

func OrangePrintf(str string, v ...any)

func OrangePrintln

func OrangePrintln(output ...any)

橙色

func OrangeSprintf

func OrangeSprintf(str any, rest ...string) string

func P

func P(data any, outputColor ...string)

func PinkPrintf

func PinkPrintf(str string, v ...any)

func PinkPrintln

func PinkPrintln(output ...any)

紫色

func PinkSprintf

func PinkSprintf(str any, rest ...string) string

func RedPrintf

func RedPrintf(str string, v ...any)

func RedPrintln

func RedPrintln(output ...any)

红色

func RedSprintf

func RedSprintf(str any, rest ...string) string

func YellowPrintf

func YellowPrintf(str string, v ...any)

func YellowPrintln

func YellowPrintln(output ...any)

黄色

func YellowSprintf

func YellowSprintf(str any, rest ...string) string

Types

type ClogProvider

type ClogProvider struct {
	core.ServiceProvider // 显示的写上实现了哪个接口主要是为了代码可读性以及 IDE 友好
	// contains filtered or unexported fields
}

func (*ClogProvider) AfterInit

func (*ClogProvider) AfterInit(instance any) error

func (*ClogProvider) BeforeInit

func (self *ClogProvider) BeforeInit(c core.Container) error

往服务中心注册自己前的操作

func (*ClogProvider) InitOnBind

func (*ClogProvider) InitOnBind() bool

日志服务不需要延迟初始化,启动程序就需要打印日志了

func (*ClogProvider) Name

func (self *ClogProvider) Name() string

func (*ClogProvider) Params

func (sp *ClogProvider) Params(c core.Container) []interface{}

func (*ClogProvider) RegisterProviderInstance

func (self *ClogProvider) RegisterProviderInstance(c core.Container) core.NewInstanceFunc

type ClogService

type ClogService struct {
	Service
	// contains filtered or unexported fields
}

func (*ClogService) Debug

func (self *ClogService) Debug(out ...interface{})

debug

func (*ClogService) Debugf

func (self *ClogService) Debugf(out ...interface{})

func (*ClogService) Error

func (self *ClogService) Error(out ...interface{})

err

func (*ClogService) Errorf

func (self *ClogService) Errorf(out ...interface{})

func (*ClogService) Fatal

func (self *ClogService) Fatal(out ...interface{})

fatal

func (*ClogService) Fatalf

func (self *ClogService) Fatalf(out ...interface{})

func (*ClogService) Info

func (self *ClogService) Info(out ...interface{})

info

func (*ClogService) Infof

func (self *ClogService) Infof(out ...interface{})

func (*ClogService) Trace

func (self *ClogService) Trace(out ...interface{})

trace

func (*ClogService) Tracef

func (self *ClogService) Tracef(out ...interface{})

func (*ClogService) Warn

func (self *ClogService) Warn(out ...interface{})

warn

func (*ClogService) Warnf

func (self *ClogService) Warnf(out ...interface{})

type Service

type Service interface {
	Trace(output ...interface{})
	Tracef(output ...interface{})
	Debug(output ...interface{})
	Debugf(output ...interface{})
	Info(output ...interface{})
	Infof(output ...interface{})
	Warn(output ...interface{})
	Warnf(output ...interface{})
	Error(output ...interface{})
	Errorf(output ...interface{})
	Fatal(output ...interface{})
	Fatalf(output ...interface{})
}

Jump to

Keyboard shortcuts

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