Sha256: 91bd5b0b27fe555bf046f433272ac93ae5be6b7ad57835049dd9ccde79f85e63

Contents?: true

Size: 759 Bytes

Versions: 10

Compression:

Stored size: 759 Bytes

Contents

# frozen_string_literal: true
# Copyright (c) 2010-2021 GoodData Corporation. All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

module GoodData
  # Dummy implementation of logger
  class NilLogger
    attr_accessor :level

    def initialize(*_args)
      @level = nil
    end

    # No body define need for dummy logger
    def debug(*_args)
    end

    alias_method :info, :debug
    alias_method :warn, :debug
    alias_method :error, :debug
    alias_method :add, :debug

    def debug?
      false
    end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gooddata-2.3.1-java lib/gooddata/core/nil_logger.rb
gooddata-2.3.1 lib/gooddata/core/nil_logger.rb
gooddata-2.3.0-java lib/gooddata/core/nil_logger.rb
gooddata-2.3.0 lib/gooddata/core/nil_logger.rb
gooddata-2.2.0-java lib/gooddata/core/nil_logger.rb
gooddata-2.2.0 lib/gooddata/core/nil_logger.rb
gooddata-2.1.19-java lib/gooddata/core/nil_logger.rb
gooddata-2.1.19 lib/gooddata/core/nil_logger.rb
gooddata-2.1.17-java lib/gooddata/core/nil_logger.rb
gooddata-2.1.17 lib/gooddata/core/nil_logger.rb