Skip to content

utils

import "github.com/open-outbox/relay/internal/utils"

Package utils provides shared helper functions and common logic used across the Open Outbox Relay, including logging decorators and error handling utilities.

func LogIfError(logger *zap.Logger, err error, msg string, fields ...zap.Field)

LogIfError writes a log entry at the Error level only if the provided error is non-nil and does not represent a normal context cancellation.

This is typically used to handle background process errors where context.Canceled is an expected signal during shutdown rather than a failure.