From be8c0baa181deafef9bbf093e5ad656def63b0ab Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 4 Feb 2022 19:41:08 +0000 Subject: [PATCH] DEV: Include exception class in Discourse.warn_exception log (#15822) Sometimes, the 'message' portion of an exception isn't enough to work out what's happening. In these cases, including the exception class name can help with debugging. --- lib/discourse.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/discourse.rb b/lib/discourse.rb index c93b1dc42f5..f65add734b7 100644 --- a/lib/discourse.rb +++ b/lib/discourse.rb @@ -835,7 +835,7 @@ module Discourse # logster Rails.logger.add_with_opts( ::Logger::Severity::WARN, - "#{message} : #{e}", + "#{message} : #{e.class.name} : #{e}", "discourse-exception", backtrace: e.backtrace.join("\n"), env: env