Documentation
¶
Overview ¶
Package logfields provides a standard location for field names we expect in logs
Index ¶
- Constants
- Variables
- func AuditChangeID(changeID interface{}) zapcore.Field
- func AuditQueueAttempts(attempts interface{}) zapcore.Field
- func BID(bid string) zapcore.Field
- func Date(date interface{}) zapcore.Field
- func FaktoryQueue(faktoryQueue string) zapcore.Field
- func IsFinalAttempt(isFinal bool) zapcore.Field
- func JID(jid string) zapcore.Field
- func JobType(jobType string) zapcore.Field
- func MaxRetries(maxRetries int) zapcore.Field
- func ModelPlanID(modelPlanID uuid.UUID) zapcore.Field
- func RetryCount(retryCount int) zapcore.Field
- func TraceField(traceID string) zapcore.Field
- func TranslatedAuditQueueID(translatedAuditQueueID uuid.UUID) zapcore.Field
- func UserID(userID uuid.UUID) zapcore.Field
Constants ¶
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.
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
const TraceFieldKey string = "traceID"
TraceFieldKey is the key to check the trace of a logging chain
Variables ¶
var DataLoaderAppSection = zap.String(AppSectionKey, DataLoaderSectionKey)
var FaktoryAppSection = zap.String(AppSectionKey, FaktorySectionKey)
FaktoryAppSection provides the zap field for specifying the part of the application is faktory
Functions ¶
func AuditChangeID ¶
AuditChangeID provides the zap field for an audit change id
func AuditQueueAttempts ¶
AuditQueueAttempts provides the zap field for the number of attempts
func FaktoryQueue ¶
FaktoryQueue provides the zap field for a FaktoryQueue
func IsFinalAttempt ¶
IsFinalAttempt returns the zap core field for a worker is final attempt
func MaxRetries ¶
MaxRetries returns the zap core field for a worker max retries
func ModelPlanID ¶
ModelPlanID provides the zap field for the modelPlanID
func RetryCount ¶
RetryCount returns the zap core field for a worker retry count
func TraceField ¶
func TranslatedAuditQueueID ¶
TranslatedAuditQueueID provides the zap field for a TranslatedAuditQueueID
Types ¶
This section is empty.