behavior

package
v1.1.22 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderXRequestID    = "X-Request-ID"
	HeaderXActionID     = "X-Action-ID"
	HeaderXForwardedFor = "X-Forwarded-For"
	HeaderXRealIP       = "X-Real-IP"
	HeaderContentLength = "Content-Length"
	HeaderTraceID       = "TraceID"
	HeaderServiceID     = "ServiceID"
)

Variables

This section is empty.

Functions

func ConvertLogDetail added in v1.1.3

func ConvertLogDetail(s string) logDetails

func ConvertLogDetails

func ConvertLogDetails(logID int64, s string) logDetails

revive:disable:unexported-return

func ConvertLogSQLDetails added in v1.0.70

func ConvertLogSQLDetails(logID int64, s string) logSQLDetails

func DecodeDetailMessage added in v1.1.0

func DecodeDetailMessage(message interface{}, l interface{}) error

Types

type Log

type Log struct {
	Context *logContext
}

func DecodeMessage added in v1.0.60

func DecodeMessage(message interface{}) *Log

func New

func New(moduleName string) *Log

func (*Log) Begin

func (l *Log) Begin(c echo.Context)

func (*Log) CheckAndMakeTable

func (l *Log) CheckAndMakeTable(engine *xorm.Engine)

func (*Log) CheckTable

func (l *Log) CheckTable(session *xorm.Engine) bool

func (*Log) InsertTable

func (l *Log) InsertTable(engine *xorm.Engine) error

func (*Log) OutToConsole

func (l *Log) OutToConsole()

func (*Log) OutToSNS

func (l *Log) OutToSNS(cfg aws.Config, topic string) error

func (*Log) SetError

func (l *Log) SetError(message string)

func (*Log) SetPanic

func (l *Log) SetPanic(message string)

func (*Log) WithEnv

func (l *Log) WithEnv(env string) *Log

func (*Log) WithMemberID

func (l *Log) WithMemberID(id int64) *Log

func (*Log) WithMemberName

func (l *Log) WithMemberName(name string) *Log

func (*Log) WithMemberOrgID

func (l *Log) WithMemberOrgID(orgid int64) *Log

func (*Log) WithSQL added in v1.0.70

func (l *Log) WithSQL(b *bytes.Buffer) *Log

func (*Log) WithStack

func (l *Log) WithStack(b *bytes.Buffer) *Log

func (*Log) Write

func (l *Log) Write(c *echo.Context)

func (*Log) WriteLog

func (l *Log) WriteLog(c echo.Context)

Jump to

Keyboard shortcuts

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