From 452f9ee0bcca071cb520d3d640acebdc91f5e3ef Mon Sep 17 00:00:00 2001 From: Steven Bull Date: Mon, 27 Mar 2017 16:16:50 -0700 Subject: Add error logging to Active Job Active Job logging instrumentation is changed to log errors (with backtrace) when a job raises an exception in #perform. This improves debugging during development and test with the default configuration. Prior to Rails 5, the default development configuration ran jobs with InlineAdapter, which would raise exceptions to the caller and be shown in the development log. In Rails 5, the default adapter was changed to AsyncAdapter, which would silently swallow exceptions and log a "Performed SomeJob from Async..." info message. This could be confusing to a developer, as it would seem that the job was performed successfully. This patch removes the "Performed..." info message from the log and adds an error-level "Error performing SomeJob..." log message which includes the exception backtrace for jobs that raise an exception within the #perform method. It provides this behavior for all adapters. --- activejob/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activejob/CHANGELOG.md') diff --git a/activejob/CHANGELOG.md b/activejob/CHANGELOG.md index 6b4f93df8b..ddfb926e02 100644 --- a/activejob/CHANGELOG.md +++ b/activejob/CHANGELOG.md @@ -1 +1,7 @@ +* Change logging instrumentation to log errors when a job raises an exception. + + Fixes #26848. + + *Steven Bull* + Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/activejob/CHANGELOG.md) for previous changes. -- cgit v1.2.3