Sha256: af9f19421c8584da4cae237398668d722c90bd64707cbc7d4a356f28a4336c9d

Contents?: true

Size: 889 Bytes

Versions: 3

Compression:

Stored size: 889 Bytes

Contents

require 'loga/version'
require 'loga/tagged_logging'
require 'loga/configuration'
require 'loga/utilities'
require 'loga/event'
require 'loga/parameter_filter'
require 'loga/rack/logger'
require 'loga/rack/request'
require 'loga/rack/request_id'
require 'loga/railtie' if defined?(Rails)

module Loga
  ConfigurationError = Class.new(StandardError)

  def self.configuration
    if @configuration.nil?
      raise ConfigurationError,
            'Loga has not been configured. Configure with Loga.configure(options)'
    end
    @configuration
  end

  def self.configure(options, framework_options = {})
    unless @configuration.nil?
      raise ConfigurationError, 'Loga has already been configured'
    end
    @configuration ||= Configuration.new(options, framework_options)
  end

  def self.logger
    configuration.logger
  end

  def self.reset
    @configuration = nil
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
loga-2.1.2 lib/loga.rb
loga-2.1.1 lib/loga.rb
loga-2.1.0 lib/loga.rb