Skip to content
Browse files

logger: RAILS_DEFAULT_LOGGER => Rails.logger

  • Loading branch information...
1 parent 90814b1 commit 3183cc52a261dfc336ef9980b3dc6bd774af4418 @Vanuan Vanuan committed Mar 11, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/backlogs_printable_cards.rb
View
14 lib/backlogs_printable_cards.rb
@@ -78,7 +78,7 @@ def initialize(layout)
geom = Prawn::Document::PageGeometry::SIZES[@papersize]
if geom.nil?
- RAILS_DEFAULT_LOGGER.error "Backlogs printable cards: paper size '#{@papersize}' for label #{@name} not supported"
+ Rails.logger.error "Backlogs printable cards: paper size '#{@papersize}' for label #{@name} not supported"
@valid = false
return
end
@@ -89,18 +89,18 @@ def initialize(layout)
@valid = false
if @down < 1
- RAILS_DEFAULT_LOGGER.error "Backlogs printable cards: #{@name} has no rows"
+ Rails.logger.error "Backlogs printable cards: #{@name} has no rows"
elsif @across < 1
- RAILS_DEFAULT_LOGGER.error "Backlogs printable cards: #{@name} has no columns"
+ Rails.logger.error "Backlogs printable cards: #{@name} has no columns"
elsif @height > @vertical_pitch
- RAILS_DEFAULT_LOGGER.error "Backlogs printable cards: #{@name} card height exceeds vertical pitch"
+ Rails.logger.error "Backlogs printable cards: #{@name} card height exceeds vertical pitch"
elsif @width > @horizontal_pitch
- RAILS_DEFAULT_LOGGER.error "Backlogs printable cards: #{@name} card width exceeds horizontal pitch"
+ Rails.logger.error "Backlogs printable cards: #{@name} card width exceeds horizontal pitch"
else
@valid = true
end
rescue => e
- RAILS_DEFAULT_LOGGER.error "Backlogs printable cards: error loading #{layout['name']}: #{e}"
+ Rails.logger.error "Backlogs printable cards: error loading #{layout['name']}: #{e}"
@valid = false
end
end
@@ -228,7 +228,7 @@ def self.update
@@layouts[key] = layout if layout.valid
}
rescue => e
- RAILS_DEFAULT_LOGGER.error "Backlogs printable cards: problem loading labels: #{e}"
+ Rails.logger.error "Backlogs printable cards: problem loading labels: #{e}"
end
end

0 comments on commit 3183cc5

Please sign in to comment.
Something went wrong with that request. Please try again.