log

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ApiManager = myapi.NewApiGroup[ApiCategory]()
)

Functions

func GetExceptionDetail

func GetExceptionDetail(projectName string, skip int) (errorTrace string)

func SendEventLog

func SendEventLog(log EventLog)

func SendExceptionErrLog

func SendExceptionErrLog(err error)

func SendExceptionLog

func SendExceptionLog(log ExceptionLog)

func SendMiddleLog

func SendMiddleLog(log MiddleLog)

Types

type ApiCategory

type ApiCategory struct {
	Group   string `json:"group"`
	JobType string `json:"job_type"`
}

定义 API 分类信息

type EventLog

type EventLog struct {
	Method    string `form:"-" json:"-"`
	Path      string `form:"-" json:"-"`
	IsSuccess bool   `form:"-" json:"-"`
	InfoLog
}

func (*EventLog) IsValid

func (self *EventLog) IsValid() bool

type ExceptionLog

type ExceptionLog struct {
	ExcTitle  string
	ExcDesc   string
	ExcMethod string
	ExcModule string
}

type InfoLog

type InfoLog struct {
	JobNo    string `form:"-" json:"-"`
	Desc     string `form:"-" json:"-"`
	Operator string `form:"-" json:"operator"`
}

type MiddleLog

type MiddleLog struct {
	MiddleName string `form:"-" json:"-"`
	Title      string `form:"-" json:"-"`
	JobNo      string `form:"-" json:"-"`
	Desc       string `form:"-" json:"-"`
}

中间件处理日志

Jump to

Keyboard shortcuts

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