summaryrefslogtreecommitdiff
path: root/lib/mixlib/authentication/null_logger.rb
blob: 579b1e23d215e85b4137ade1e5972c5fe6c90b41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module Mixlib
  module Authentication
    module NullLogger

      attr_accessor :level

      %i{trace debug info warn error fatal}.each do |method_name|
        class_eval(<<-METHOD_DEFN, __FILE__, __LINE__)
          def #{method_name}(msg=nil, &block)
            true
          end
        METHOD_DEFN
      end

      %i{trace? debug? info? warn? error? fatal?}.each do |method_name|
        class_eval(<<-METHOD_DEFN, __FILE__, __LINE__)
          def #{method_name}
            false
          end
        METHOD_DEFN
      end
    end
  end
end