Sha256: fb827f14037f027f1eae1dcfb9052ae60bd3673470813a39fc0fd129c3f82462

Contents?: true

Size: 460 Bytes

Versions: 3

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

module PhiAttrs
  PHI_ACCESS_LOG_TAG = 'PHI Access Log'

  class Logger
    class << self
      def logger
        unless @logger
          logger = ActiveSupport::Logger.new(PhiAttrs.log_path)
          logger.formatter = Formatter.new
          @logger = ActiveSupport::TaggedLogging.new(logger)
        end
        @logger
      end

      delegate :debug, :info, :warn, :error, :fatal, :tagged, to: :logger
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
phi_attrs-0.2.2 lib/phi_attrs/logger.rb
phi_attrs-0.2.1 lib/phi_attrs/logger.rb
phi_attrs-0.2.0 lib/phi_attrs/logger.rb