diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c365277..e4d48109 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The job rescuer now sets `river:rescue_count` with an integer count of how many times the job has been rescued by the `JobRescuer` maintenance process when it's considered stuck. [PR #1047](https://github.com/riverqueue/river/pull/1047). +### Changed + +- Errors returned from job workers are now logged in full using a `slog.Any` attribute. Previously, only their error text was logged. [PR #1051](https://github.com/riverqueue/river/pull/1051). + ### Fixed - Set `updated_at` when invoking pilot `PeriodicJobUpsert`. [PR #1045](https://github.com/riverqueue/river/pull/1045). diff --git a/riverlog/river_log.go b/riverlog/river_log.go index 5f689858..73c1dd1b 100644 --- a/riverlog/river_log.go +++ b/riverlog/river_log.go @@ -180,7 +180,7 @@ func (m *Middleware) Work(ctx context.Context, job *rivertype.JobRow, doInner fu })) if err != nil { m.Logger.ErrorContext(ctx, m.Name+": Error marshaling log data", - slog.String("error", err.Error()), + slog.Any("error", err), ) }