diff --git a/CHANGELOG.md b/CHANGELOG.md index bbd3856b..55e0a4bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Jobs erroring or panicking no longer logs at the error/warn level because this is not indicative of a problem inside of River itself. These log statements have been demoted to info. [PR #1190](https://github.com/riverqueue/river/pull/1190). + ### Fixed - Fix in `Client.Start` where previously it was possible for a River client that only partially started before erroring to not try to start on subsequent `Start` invocations. [PR #1187](https://github.com/riverqueue/river/pull/1187). diff --git a/example_graceful_shutdown_test.go b/example_graceful_shutdown_test.go index b2ab663c..5c281007 100644 --- a/example_graceful_shutdown_test.go +++ b/example_graceful_shutdown_test.go @@ -168,5 +168,4 @@ func Example_gracefulShutdown() { // Received SIGINT/SIGTERM; initiating soft stop (try to wait for jobs to finish) // Received SIGINT/SIGTERM again; initiating hard stop (cancel everything) // Job cancelled - // msg="jobexecutor.JobExecutor: Job errored; retrying" error="context canceled" job_kind=waits_for_cancel_only } diff --git a/internal/jobexecutor/job_executor.go b/internal/jobexecutor/job_executor.go index db153db4..888031eb 100644 --- a/internal/jobexecutor/job_executor.go +++ b/internal/jobexecutor/job_executor.go @@ -436,12 +436,12 @@ func (e *JobExecutor) reportError(ctx context.Context, jobRow *rivertype.JobRow, e.Logger.DebugContext(ctx, e.Name+": Job cancelled explicitly", logAttrs...) case res.Err != nil: if jobRow.Attempt >= jobRow.MaxAttempts { - e.Logger.ErrorContext(ctx, e.Name+": Job errored", logAttrs...) + e.Logger.InfoContext(ctx, e.Name+": Job errored", logAttrs...) } else { - e.Logger.WarnContext(ctx, e.Name+": Job errored; retrying", logAttrs...) + e.Logger.InfoContext(ctx, e.Name+": Job errored; retrying", logAttrs...) } case res.PanicVal != nil: - e.Logger.ErrorContext(ctx, e.Name+": Job panicked", logAttrs...) + e.Logger.InfoContext(ctx, e.Name+": Job panicked", logAttrs...) } if e.ErrorHandler != nil && !cancelJob {