# frozen_string_literal: true

require_relative "logger/version"
require_relative "logger/configuration"
require_relative "logger/lograge_railtie" if defined?(Rails::Railtie)

module Oz
  module Logger
    class Error < StandardError; end
    class << self
      attr_accessor :configuration
    end

    def self.configuration
      @configuration ||= Configuration.new
    end

    def self.reset
      @configuration = Configuration.new
    end

    def self.configure
      yield(configuration)
    end

    def self.headers
      self.configuration.headers
    end

    def self.additional_attributes
      self.configuration.additional_attributes
    end

    def self.params_exceptions
      self.configuration.params_exceptions
    end
  end
end
