goodlog

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

实现服务中心规定的服务注册要求,遵循注册协议 engine.Container

Index

Constants

View Source
const Name = "goodlog"

Variables

This section is empty.

Functions

func Blue

func Blue(output interface{})

蓝色

func Bluef

func Bluef(output ...interface{})

func Cyan

func Cyan(output interface{})

青色

func Cyanf

func Cyanf(output ...interface{})

func Debug

func Debug(out ...interface{})

func Debugf

func Debugf(out ...interface{})

func Error

func Error(out ...interface{})

func Errorf

func Errorf(out ...interface{})

func Fatal

func Fatal(out ...interface{})

func Fatalf

func Fatalf(out ...interface{})

func Green

func Green(output interface{})

绿色

func Greenf

func Greenf(output ...interface{})

func Info

func Info(out ...interface{})

func Infof

func Infof(out ...interface{})

func Pink

func Pink(output interface{})

紫色

func Pinkf

func Pinkf(output ...interface{})

func Red

func Red(output interface{})

红色

func Redf

func Redf(output ...interface{})

func Trace

func Trace(out ...interface{})

func Tracef

func Tracef(out ...interface{})

func Warn

func Warn(out ...interface{})

func Warnf

func Warnf(out ...interface{})

func Yellow

func Yellow(output interface{})

黄色

func Yellowf

func Yellowf(output ...interface{})

Types

type GoodlogProvider

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

func (*GoodlogProvider) AfterInit

func (*GoodlogProvider) AfterInit(instance any) error

func (*GoodlogProvider) BeforeInit

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

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

func (*GoodlogProvider) InitOnBoot

func (*GoodlogProvider) InitOnBoot() bool

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

func (*GoodlogProvider) Name

func (self *GoodlogProvider) Name() string

func (*GoodlogProvider) Params

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

func (*GoodlogProvider) RegisterProviderInstance

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

type GoodlogService

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

func (*GoodlogService) Color

func (s *GoodlogService) Color(color string, output interface{})

color

func (*GoodlogService) Colorf

func (s *GoodlogService) Colorf(color string, out ...interface{})

func (*GoodlogService) Debug

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

debug

func (*GoodlogService) Debugf

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

func (*GoodlogService) Error

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

err

func (*GoodlogService) Errorf

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

func (*GoodlogService) Fatal

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

fatal

func (*GoodlogService) Fatalf

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

func (*GoodlogService) Info

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

info

func (*GoodlogService) Infof

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

func (*GoodlogService) P

func (s *GoodlogService) P(color string, data any)

func (*GoodlogService) Trace

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

trace

func (*GoodlogService) Tracef

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

func (*GoodlogService) Warn

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

warn

func (*GoodlogService) Warnf

func (self *GoodlogService) 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{})

	Color(color string, output interface{})
	Colorf(color string, format string, output ...interface{})

	P(output interface{})
}

Jump to

Keyboard shortcuts

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