Sha256: 16a6e23141911a0c7fa096c0389c9c446bcf4d87f91f79965a297edf1be240f3

Contents?: true

Size: 677 Bytes

Versions: 10

Compression:

Stored size: 677 Bytes

Contents

# Plugin logger that will delegate to the OSGI LogService
module Killbill
  module Plugin
    class Logger
      def initialize(delegate)
        @logger = delegate
      end

      def debug(msg)
        @logger.log(4, msg)
      end

      def info(msg)
        @logger.log(3, msg)
      end

      def warn(msg)
        @logger.log(2, msg)
      end

      def error(msg)
        @logger.log(1, msg)
      end

      alias_method :fatal, :error

      # XXX TODO
      def debug?
        false
      end

      def info?
        true
      end

      def warn?
        true
      end

      alias_method :error?, :warn?
      alias_method :fatal?, :error?
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
killbill-1.0.10 lib/killbill/logger.rb
killbill-1.0.9 lib/killbill/logger.rb
killbill-1.0.8 lib/killbill/logger.rb
killbill-1.0.7 lib/killbill/logger.rb
killbill-1.0.6 lib/killbill/logger.rb
killbill-1.0.5 lib/killbill/logger.rb
killbill-1.0.4 lib/killbill/logger.rb
killbill-1.0.3 lib/killbill/logger.rb
killbill-1.0.2 lib/killbill/logger.rb
killbill-1.0.1 lib/killbill/logger.rb