DEV: Log backtrace along with the error (#27242)

Just logging the error message is useless if we don't know where the
error message is raised from.
This commit is contained in:
Alan Guo Xiang Tan 2024-05-29 16:13:23 +08:00 committed by GitHub
parent 4580844c56
commit f76d143919
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -943,7 +943,7 @@ module Discourse
# Skip warmup in development mode - it makes boot take ~2s longer
PrettyText.cook("warm up **pretty text**") if !Rails.env.development?
rescue => e
Rails.logger.error("Failed to warm up pretty text: #{e}")
Rails.logger.error("Failed to warm up pretty text: #{e}\n#{e.backtrace.join("\n")}")
end
nil