debug

package
v1.20.108 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Zlib Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DUnkLevel       = Level(0)
	DNormalLevel    = Level(1)
	DImportantLevel = Level(2)
	DTightLevel     = Level(3) // 紧级
	DFatalLevel     = Level(4) // 致命
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Debug

type Debug struct {
	Code   int32  `json:"code"`
	Title  string `json:"title"`
	Name   string `json:"name"`   //服务名称
	Module string `json:"module"` //模板名
	Detail string `json:"detail"` //简单描述
	Stack  string `json:"stack"`  //调用堆栈
	More   string `json:"more"`   //更多
	Level  Level  `json:"level"`  //级别(严重程度)
	ErrMsg string `json:"errMsg"`
	// contains filtered or unexported fields
}

func New

func New(code int32) *Debug

func NewStack

func NewStack(code int32) *Debug

func (*Debug) Error added in v0.1.2

func (d *Debug) Error() error

func (*Debug) MoreTo added in v0.3.5

func (d *Debug) MoreTo() string

func (*Debug) String added in v0.1.2

func (d *Debug) String() string

func (*Debug) WithDetail added in v0.1.2

func (d *Debug) WithDetail(detail string) *Debug

func (*Debug) WithDetailFormat added in v1.4.4

func (d *Debug) WithDetailFormat(format string, a ...interface{}) *Debug

func (*Debug) WithErrMsg added in v1.4.12

func (d *Debug) WithErrMsg(er string) *Debug

func (*Debug) WithError added in v0.1.2

func (d *Debug) WithError(er error) *Debug

func (*Debug) WithLevel added in v0.1.2

func (d *Debug) WithLevel(l Level) *Debug

func (*Debug) WithModule added in v1.20.13

func (d *Debug) WithModule(module string) *Debug

func (*Debug) WithMore added in v0.3.5

func (d *Debug) WithMore(more string) *Debug

func (*Debug) WithMoreFormat added in v1.4.4

func (d *Debug) WithMoreFormat(more string, a ...interface{}) *Debug

func (*Debug) WithName added in v1.20.13

func (d *Debug) WithName(name string) *Debug

func (*Debug) WithStack added in v0.1.2

func (d *Debug) WithStack() *Debug

func (*Debug) WithTitle added in v0.3.3

func (d *Debug) WithTitle(title string) *Debug

type Level

type Level int32

Jump to

Keyboard shortcuts

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