Sha256: defcd8ff41e2aadefc3af0bf3c27ff1d576c6093fbc8022172063a4d59244ff6

Contents?: true

Size: 1.82 KB

Versions: 8

Compression:

Stored size: 1.82 KB

Contents

require 'rubygems'
require 'active_record'
require "#{File.dirname(__FILE__)}/appstats/acts_as_appstatsable"
require "#{File.dirname(__FILE__)}/appstats/code_injections"
require "#{File.dirname(__FILE__)}/appstats/entry"
require "#{File.dirname(__FILE__)}/appstats/entry_date"
require "#{File.dirname(__FILE__)}/appstats/date_range"
require "#{File.dirname(__FILE__)}/appstats/action"
require "#{File.dirname(__FILE__)}/appstats/context"
require "#{File.dirname(__FILE__)}/appstats/action_context_key"
require "#{File.dirname(__FILE__)}/appstats/tasks"
require "#{File.dirname(__FILE__)}/appstats/logger"
require "#{File.dirname(__FILE__)}/appstats/log_collector"
require "#{File.dirname(__FILE__)}/appstats/parser"
require "#{File.dirname(__FILE__)}/appstats/query"
require "#{File.dirname(__FILE__)}/appstats/result"
require "#{File.dirname(__FILE__)}/appstats/sub_result"
require "#{File.dirname(__FILE__)}/appstats/result_job"
require "#{File.dirname(__FILE__)}/appstats/host"
require "#{File.dirname(__FILE__)}/appstats/friendly_timer"
require "#{File.dirname(__FILE__)}/appstats/context_key"
require "#{File.dirname(__FILE__)}/appstats/appstats_query"
require "#{File.dirname(__FILE__)}/appstats/context_value"
require "#{File.dirname(__FILE__)}/appstats/test_object"
require "#{File.dirname(__FILE__)}/appstats/test_query"

# required in the appstats.gemspec
unless Appstats.const_defined?(:VERSION)
  require "#{File.dirname(__FILE__)}/appstats/version"
end

module Appstats

  def self.log(type,raw_message)
    message = "VERSION #{Appstats::VERSION} : #{raw_message}"
    if !$logger.nil?
      $logger.send(type,message)
    elsif defined?(Rails)
      Rails.logger.send(type,message)
    elsif defined?(RAILS_DEFAULT_LOGGER)
      RAILS_DEFAULT_LOGGER.send(type,message)
    else
      # puts "LOCAL LOG #{type}: #{message}"
    end
  end
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
appstats-0.20.10 lib/appstats.rb
appstats-0.20.9 lib/appstats.rb
appstats-0.20.8 lib/appstats.rb
appstats-0.20.7 lib/appstats.rb
appstats-0.20.6 lib/appstats.rb
appstats-0.20.2 lib/appstats.rb
appstats-0.20.1 lib/appstats.rb
appstats-0.20.0 lib/appstats.rb