logfields

package
v0.0.0-...-6b1c343 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package logfields provides a standard location for field names we expect in logs

Index

Constants

View Source
const (
	AppSectionKey string = "app_section"

	FaktorySectionKey    string = "faktory"
	DataLoaderSectionKey string = "dataLoader"
)

these constants represents the keys to get these data fields out of a zap logger.

View Source
const (
	BatchIDKey        string = "BID"
	JobIDKey          string = "JID"
	JobTypeKey        string = "job_type"
	RetryCountKey     string = "retry_count"
	MaxRetriesKey     string = "max_retries"
	IsFinalAttemptKey string = "is_final_attempt"
	FaktoryQueueKey   string = "faktory_queue"
)

these constants represents the common keys used in the faktory job section of the app. They are used as the key when logging data in a zap logger

View Source
const TraceFieldKey string = "traceID"

TraceFieldKey is the key to check the trace of a logging chain

Variables

FaktoryAppSection provides the zap field for specifying the part of the application is faktory

Functions

func AuditChangeID

func AuditChangeID(changeID interface{}) zapcore.Field

AuditChangeID provides the zap field for an audit change id

func AuditQueueAttempts

func AuditQueueAttempts(attempts interface{}) zapcore.Field

AuditQueueAttempts provides the zap field for the number of attempts

func BID

func BID(bid string) zapcore.Field

BID returns the zap core field for a worker BatchID

func Date

func Date(date interface{}) zapcore.Field

Date provides the zap field for the date

func FaktoryQueue

func FaktoryQueue(faktoryQueue string) zapcore.Field

FaktoryQueue provides the zap field for a FaktoryQueue

func IsFinalAttempt

func IsFinalAttempt(isFinal bool) zapcore.Field

IsFinalAttempt returns the zap core field for a worker is final attempt

func JID

func JID(jid string) zapcore.Field

JID returns the zap core field for a worker JobID

func JobType

func JobType(jobType string) zapcore.Field

JobType returns the zap core field for a worker job type

func MaxRetries

func MaxRetries(maxRetries int) zapcore.Field

MaxRetries returns the zap core field for a worker max retries

func ModelPlanID

func ModelPlanID(modelPlanID uuid.UUID) zapcore.Field

ModelPlanID provides the zap field for the modelPlanID

func RetryCount

func RetryCount(retryCount int) zapcore.Field

RetryCount returns the zap core field for a worker retry count

func TraceField

func TraceField(traceID string) zapcore.Field

func TranslatedAuditQueueID

func TranslatedAuditQueueID(translatedAuditQueueID uuid.UUID) zapcore.Field

TranslatedAuditQueueID provides the zap field for a TranslatedAuditQueueID

func UserID

func UserID(userID uuid.UUID) zapcore.Field

UserID provides the zap field for the userID

Types

This section is empty.

Jump to

Keyboard shortcuts

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