Sha256: 97ee2869bfbaeed9c3aa4700e49e9c4033a33ab5f02215595a0ea1979b769fdc

Contents?: true

Size: 525 Bytes

Versions: 21

Compression:

Stored size: 525 Bytes

Contents

require 'logger'

module Ridley
  module Logging
    class << self
      # @return [Logger]
      def logger
        @logger ||= begin
          Ridley::Logging::Logger.new
        end
      end

      # @param [Logger, nil] obj
      #
      # @return [Logger]
      def set_logger(obj)
        @logger = (obj.nil? ? Logger.new('/dev/null') : obj)
      end
      alias_method :logger=, :set_logger
    end

    # @return [Logger]
    def logger
      Ridley::Logging.logger
    end
    alias_method :log, :logger
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
ridley-5.1.0 lib/ridley/logging.rb
ridley-5.0.0 lib/ridley/logging.rb
ridley-4.6.1 lib/ridley/logging.rb
ridley-4.6.0 lib/ridley/logging.rb
ridley-4.5.1 lib/ridley/logging.rb
ridley-4.5.0 lib/ridley/logging.rb
ridley-4.4.3 lib/ridley/logging.rb
ridley-4.4.2 lib/ridley/logging.rb
ridley-4.4.1 lib/ridley/logging.rb
ridley-4.4.0 lib/ridley/logging.rb
ridley-4.3.2 lib/ridley/logging.rb
ridley-4.3.1 lib/ridley/logging.rb
ridley-4.3.0 lib/ridley/logging.rb
ridley-4.2.0 lib/ridley/logging.rb
ridley-4.1.2 lib/ridley/logging.rb
ridley-4.1.1 lib/ridley/logging.rb
ridley-4.1.0 lib/ridley/logging.rb
ridley-4.0.0 lib/ridley/logging.rb
ridley-3.1.0 lib/ridley/logging.rb
ridley-3.0.0 lib/ridley/logging.rb