Sha256: 95c38107b01069293c8f91a1a96dcb886044ae5918c50cc425e4311facf6ca65

Contents?: true

Size: 609 Bytes

Versions: 5

Compression:

Stored size: 609 Bytes

Contents

module Polytrix
  module DefaultLogger
    module ClassMethods
      def logger
        @logger ||= Polytrix.configuration.default_logger
      end
    end

    def self.included(base)
      base.extend(ClassMethods)
    end

    include ClassMethods
  end

  module Logging
    class << self
      private

      def logger_method(meth)
        define_method(meth) do |*args|
          logger.public_send(meth, *args)
        end
      end
    end

    logger_method :banner
    logger_method :debug
    logger_method :info
    logger_method :warn
    logger_method :error
    logger_method :fatal
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
polytrix-0.1.4 lib/polytrix/logging.rb
polytrix-0.1.3 lib/polytrix/logging.rb
polytrix-0.1.2 lib/polytrix/logging.rb
polytrix-0.1.1 lib/polytrix/logging.rb
polytrix-0.1.0 lib/polytrix/logging.rb