Sha256: 272795a5537dc98133de0bcb8fb9f61576046f96cdc462e7798c5e658b42d117

Contents?: true

Size: 442 Bytes

Versions: 15

Compression:

Stored size: 442 Bytes

Contents

require 'sitehub/equality'
class SiteHub
  module Middleware
    module Logging
      class LogWrapper
        include Equality

        attr_reader :logger

        def initialize(logger)
          @logger = logger
        end

        def write(msg)
          if logger.respond_to?(:<<)
            logger << msg
          elsif logger.respond_to?(:write)
            logger.write(msg)
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sitehub-0.5.0.alpha12 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.4.10 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.5.0.alpha11 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.5.0.alpha10 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.5.0.alpha8 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.5.0.alpha7 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.5.0.alpha6 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.5.0.alpha5 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.5.0.alpha4 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.5.0.alpha3 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.5.0.alpha2 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.4.9 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.4.8 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.4.7 lib/sitehub/middleware/logging/log_wrapper.rb
sitehub-0.4.6 lib/sitehub/middleware/logging/log_wrapper.rb