lib/rails/labeled_log/logging.rb in rails-labeled_log-0.0.2 vs lib/rails/labeled_log/logging.rb in rails-labeled_log-0.1.0
- old
+ new
@@ -6,19 +6,19 @@
base.send(:prepend, InstanceMethods)
end
module ClassMethods
Rails::LabeledLog::LEVELS.each do |level|
- define_method("log_#{level}".to_sym) do |message|
- log_labeled(level, message)
+ define_method("log_#{level}".to_sym) do |message, *additional_labels|
+ log_labeled(level, message, additional_labels)
end
end
private
- def log_labeled(level, message)
- Rails::LabeledLog::Logger.new(self.name).send(level, message)
+ def log_labeled(level, message, *additional_labels)
+ Rails::LabeledLog::Logger.new(self.name).send(level, message, additional_labels)
end
end
module InstanceMethods
attr_reader :logger
@@ -29,11 +29,11 @@
end
private
Rails::LabeledLog::LEVELS.each do |level|
- define_method("log_#{level}".to_sym) do |message|
- logger.send(level, message)
+ define_method("log_#{level}".to_sym) do |message, *additional_labels|
+ logger.send(level, message, additional_labels)
end
end
end
end
end