Help us shape the future of Go! Take the 2026 Go Developer Survey

errorlogger

package
v1.3.400 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupError              = "error"
	GroupService            = "service"
	GroupWarning            = "warning"
	GroupMissingTranslation = "missing-translation"
)

Variables

This section is empty.

Functions

func ParseEntries added in v1.3.300

func ParseEntries(data map[string]string) (map[string]*Entry, error)

ParseEntries reconstructs message fields and occurrence metadata from a Redis hash.

Types

type Entry added in v1.3.300

type Entry struct {
	File       string
	Line       int
	AppName    string
	Service    string
	Request    string
	Message    string
	Stack      string
	Counter    int
	Time       string
	TicketLink string
	Timestamp  int64 `json:"-"`
}

Entry is the dev-panel representation of a stored log message.

type ErrorLogger

type ErrorLogger interface {
	LogError(dataFromRecover interface{})
	LogErrorWithCode(errData interface{}, errorCode string)
	LogErrorWithCodeAndScope(errData interface{}, errorCode string, scopeID string)
	LogErrorWithRequest(c *gin.Context, errData interface{})
	LogErrorWithRequestAndCode(c *gin.Context, errData interface{}, errorCode string)
	LogErrorWithRequestAndCodeAndScope(c *gin.Context, errData interface{}, errorCode string, scopeID string)
	LogPanicWithRequest(c *gin.Context, errData interface{})
	LogServiceError(service string, dataFromRecover interface{}, notify bool)
	LogServiceErrorWithRequest(service string, c *gin.Context, errData interface{}, notify bool)
	LogServicePanicWithRequest(service string, c *gin.Context, errData interface{}, notify bool)
	LogWarning(data interface{})
	LogWarningWithRequest(c *gin.Context, data interface{})
	LogMissingTranslation(data interface{})
}

func NewRedisErrorLogger

func NewRedisErrorLogger(
	appService *app.App,
	ormService *trixorm.Engine,
	slackService slack.Slack,
	sentryService sentry.ISentry,
	requestBodyKey interface{},
) ErrorLogger

type ErrorMessage

type ErrorMessage struct {
	File      string
	Line      int
	AppName   string
	Service   string
	ErrorCode string
	ScopeID   string
	Request   []byte
	Message   string
	Stack     []byte
}

type RedisErrorLogger

type RedisErrorLogger struct {
	// contains filtered or unexported fields
}

func (*RedisErrorLogger) LogError

func (e *RedisErrorLogger) LogError(errData interface{})

func (*RedisErrorLogger) LogErrorWithCode added in v1.3.242

func (e *RedisErrorLogger) LogErrorWithCode(errData interface{}, errorCode string)

func (*RedisErrorLogger) LogErrorWithCodeAndScope added in v1.3.242

func (e *RedisErrorLogger) LogErrorWithCodeAndScope(errData interface{}, errorCode string, scopeID string)

func (*RedisErrorLogger) LogErrorWithRequest

func (e *RedisErrorLogger) LogErrorWithRequest(c *gin.Context, errData interface{})

func (*RedisErrorLogger) LogErrorWithRequestAndCode added in v1.3.242

func (e *RedisErrorLogger) LogErrorWithRequestAndCode(c *gin.Context, errData interface{}, errorCode string)

func (*RedisErrorLogger) LogErrorWithRequestAndCodeAndScope added in v1.3.242

func (e *RedisErrorLogger) LogErrorWithRequestAndCodeAndScope(c *gin.Context, errData interface{}, errorCode string, scopeID string)

func (*RedisErrorLogger) LogMissingTranslation added in v1.3.218

func (e *RedisErrorLogger) LogMissingTranslation(data interface{})

func (*RedisErrorLogger) LogPanicWithRequest added in v1.3.175

func (e *RedisErrorLogger) LogPanicWithRequest(c *gin.Context, errData interface{})

func (*RedisErrorLogger) LogServiceError added in v1.3.240

func (e *RedisErrorLogger) LogServiceError(service string, errData interface{}, notify bool)

func (*RedisErrorLogger) LogServiceErrorWithRequest added in v1.3.240

func (e *RedisErrorLogger) LogServiceErrorWithRequest(
	service string,
	c *gin.Context,
	errData interface{},
	notify bool,
)

func (*RedisErrorLogger) LogServicePanicWithRequest added in v1.3.240

func (e *RedisErrorLogger) LogServicePanicWithRequest(
	service string,
	c *gin.Context,
	errData interface{},
	notify bool,
)

func (*RedisErrorLogger) LogWarning added in v1.3.218

func (e *RedisErrorLogger) LogWarning(data interface{})

func (*RedisErrorLogger) LogWarningWithRequest added in v1.3.218

func (e *RedisErrorLogger) LogWarningWithRequest(c *gin.Context, data interface{})

Jump to

Keyboard shortcuts

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