improve error logging for warn_exception
This commit is contained in:
parent
0081de30a5
commit
25f4d98307
|
@ -446,6 +446,10 @@ module Discourse
|
|||
# report a warning maintaining backtrack for logster
|
||||
def self.warn_exception(e, message: "", env: nil)
|
||||
if Rails.logger.respond_to? :add_with_opts
|
||||
|
||||
env ||= {}
|
||||
env[:current_db] ||= RailsMultisite::ConnectionManagement.current_db
|
||||
|
||||
# logster
|
||||
Rails.logger.add_with_opts(
|
||||
::Logger::Severity::WARN,
|
||||
|
|
Loading…
Reference in New Issue