Sha256: a008a00babc95707b90ad001035cb4524d1accd0754da7c71b9a2e2ab1c84a78

Contents?: true

Size: 917 Bytes

Versions: 105

Compression:

Stored size: 917 Bytes

Contents

# encoding: utf-8
require "logstash/logging/logger"
require "logstash/namespace"

module LogStash module Util
  module Loggable
    def self.included(klass)

      def klass.log4j_name
        ruby_name = self.name || self.class.name || self.class.to_s
        ruby_name.gsub('::', '.').downcase
      end

      def klass.logger
        @logger ||= LogStash::Logging::Logger.new(log4j_name)
      end

      def klass.slow_logger(warn_threshold, info_threshold, debug_threshold, trace_threshold)
        @slow_logger ||= LogStash::Logging::SlowLogger.new(log4j_name, warn_threshold, info_threshold, debug_threshold, trace_threshold)
      end

      def logger
        self.class.logger
      end

      def slow_logger(warn_threshold, info_threshold, debug_threshold, trace_threshold)
        self.class.slow_logger(warn_threshold, info_threshold, debug_threshold, trace_threshold)
      end
    end
  end
end; end

Version data entries

105 entries across 102 versions & 11 rubygems

Version Path
logstash-output-scalyr-0.1.9 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/util/loggable.rb
logstash-output-scalyr-0.1.8 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/util/loggable.rb
logstash-output-scalyr-0.1.7 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/util/loggable.rb
logstash-output-scalyr-0.1.6 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/util/loggable.rb
logstash-output-newrelic-1.2.0 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/util/loggable.rb
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/util/loggable.rb
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.2.1-java/lib/logstash/util/loggable.rb
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/util/loggable.rb
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.2.1-java/lib/logstash/util/loggable.rb
logstash-output-scalyr-0.1.5 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/util/loggable.rb
logstash-output-scalyr-0.1.4 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/util/loggable.rb
logstash-output-scalyr-0.1.3 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/util/loggable.rb
logstash-output-scalyr-0.1.2 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/util/loggable.rb
logstash-core-5.6.16-java lib/logstash/util/loggable.rb
logstash-core-5.6.15-java lib/logstash/util/loggable.rb
logstash-core-5.6.14-java lib/logstash/util/loggable.rb
logstash-core-5.6.13-java lib/logstash/util/loggable.rb
logstash-core-5.6.12-java lib/logstash/util/loggable.rb
logstash-core-5.6.11-java lib/logstash/util/loggable.rb
logstash-core-6.3.2-java lib/logstash/util/loggable.rb