lib/data_objects/logger.rb in data_objects-0.9.2 vs lib/data_objects/logger.rb in data_objects-0.9.3
- old
+ new
@@ -211,22 +211,22 @@
# in the API:
# :fatal, :error, :warn, :info, :debug
# :off only gets an off? method
LEVELS.each_pair do |name, number|
unless name.to_sym == :off
- class_eval <<-EOS
- # DOC
- def #{name}(message)
- self.<<( prep_msg(message, "#{name}") ) if #{name}?
- end
+ class_eval <<-EOS, __FILE__, __LINE__
+ # DOC
+ def #{name}(message)
+ self.<<( prep_msg(message, "#{name}") ) if #{name}?
+ end
EOS
end
- class_eval <<-EOS
- # DOC
- def #{name}?
- #{number} >= level
- end
+ class_eval <<-EOS, __FILE__, __LINE__
+ # DOC
+ def #{name}?
+ #{number} >= level
+ end
EOS
end
end # class Logger
end # module DataObjects