lib/rrj/errors/error.rb in ruby_rabbitmq_janus-2.6.0.pre.247 vs lib/rrj/errors/error.rb in ruby_rabbitmq_janus-2.6.0.pre.258

- old
+ new

@@ -16,19 +16,15 @@ write_error(message, level) end private - def log - RubyRabbitmqJanus::Tools::Log - end - - def logger - log.instance - end - def write_error(message, level) - log.instance_method(level).bind(logger).call(message) + if defined?(::Log) + ::Log.add(level, message) + else + p "#{level}, #{message}" + end end end end end