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

errorlogger

package
v1.3.244 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

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