lib/faye/mixins/logging.rb in faye-0.7.2 vs lib/faye/mixins/logging.rb in faye-0.8.0
- old
+ new
@@ -1,13 +1,6 @@
module Faye
-
- class << self
- attr_accessor :logger
- end
-
- self.logger = method(:puts)
-
module Logging
DEFAULT_LOG_LEVEL = :error
LOG_LEVELS = {
@@ -40,10 +33,10 @@
end
timestamp = Time.now.strftime('%Y-%m-%d %H:%M:%S')
banner = " [#{ level.to_s.upcase }] [#{ self.class.name }] "
- puts(timestamp + banner + message)
+ Faye.logger.call(timestamp + banner + message)
end
LOG_LEVELS.each do |level, value|
define_method(level) { |*args| log(args, level) }
end