debug

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: Zlib Imports: 4 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
	Title  string
	Name   string //服务模板名称
	Detail string //简单描述
	Stack  string //调用堆栈
	More   string //更多
	Level  Level  //级别(严重程度)
	Error  error
}

func New

func New(code int32) Debug

func NewStack

func NewStack(code int32) Debug

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(format string, a ...interface{}) 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) WithMore added in v0.3.5

func (d Debug) WithMore(more string, a ...interface{}) 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