Defect #14598

Wrong test with logger.info in model mail_handler

Added by Jérôme BATAILLE over 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email receiving
Target version:2.4.0
Resolution:Fixed Affected version:

RM_mail_handler_bug_fix.diff Magnifier (2.95 KB) Jérôme BATAILLE, 2013-08-01 15:33


Related issues

Related to Redmine - Patch #9102: Dry up MailHandler logging New 2011-08-22

Associated revisions

Revision 12073
Added by Toshi MARUYAMA over 4 years ago

remove ineffective "logger.info" and "logger.error" check from MailHandler model (#14598)

History

#1 Updated by Jérôme BATAILLE over 4 years ago

patch made against Redmine V1.2.1

if logger.info --> if logger.info?

#2 Updated by Toshi MARUYAMA over 4 years ago

"logger.info" is always true.

$ RAILS_ENV=test ruby script/rails console
Loading test environment (Rails 3.2.13)
1.9.3p429 :001 > logger = Logger.new(STDOUT)
 => #<Logger:0x000000055b5b80 ... 
1.9.3p429 :002 > logger.level = Logger::ERROR
 => 3 
1.9.3p429 :003 > logger.info
 => true 
1.9.3p429 :004 > logger.info?
 => false 
1.9.3p429 :005 > logger.info "test" 
 => true 
1.9.3p429 :006 > logger.level = Logger::INFO
 => 1 
1.9.3p429 :007 > logger.info?
 => true 
1.9.3p429 :008 > logger.info
nil
 => true 
1.9.3p429 :009 > logger.info "test" 
test
 => true 

#3 Updated by Toshi MARUYAMA over 4 years ago

  • Status changed from New to Closed

Committed in trunk r12073.

#4 Updated by Jérôme BATAILLE about 4 years ago

Any idea of the version in which the revision will be included ?

#5 Updated by Jérôme BATAILLE about 4 years ago

  • Status changed from Closed to Reopened

#6 Updated by Jérôme BATAILLE about 4 years ago

I'm sorry to reopen this issue, but because it was closed without a target version, I think it was fallen in the limbo :-)

#7 Updated by Toshi MARUYAMA about 4 years ago

  • Status changed from Reopened to Closed
  • Target version set to 2.4.0
  • Resolution set to Fixed

It is in 2.4.0.

#8 Updated by Jérôme BATAILLE about 4 years ago

Thanks a lot !

#9 Updated by Go MAEDA almost 2 years ago

  • Related to Patch #9102: Dry up MailHandler logging added

Also available in: Atom PDF