]> source.dussan.org Git - redmine.git/commitdiff
Fixed that some mail handler log messages are not prepended with "MailHandler:" ...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 14 Nov 2015 11:34:45 +0000 (11:34 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 14 Nov 2015 11:34:45 +0000 (11:34 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@14880 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/mail_handler.rb

index 99462179e645d270eaf6e79f9aafdbf2bf798b58..0c3d34c41d3dd46bcfb6bb9005b89858ce52385e 100644 (file)
@@ -54,7 +54,7 @@ class MailHandler < ActionMailer::Base
   def self.safe_receive(*args)
     receive(*args)
   rescue Exception => e
-    logger.error "An unexpected error occurred when receiving email: #{e.message}" if logger
+    logger.error "MailHandler: an unexpected error occurred when receiving email: #{e.message}" if logger
     return false
   end
 
@@ -176,7 +176,7 @@ class MailHandler < ActionMailer::Base
     end
   rescue ActiveRecord::RecordInvalid => e
     # TODO: send a email to the user
-    logger.error e.message if logger
+    logger.error "MailHandler: #{e.message}" if logger
     false
   rescue MissingInformation => e
     logger.error "MailHandler: missing information from #{user}: #{e.message}" if logger