Class: NewRelic::Control::Frameworks::Rails3
- Inherits:
-
Rails
- Object
- NewRelic::Control
- Rails
- NewRelic::Control::Frameworks::Rails3
- Defined in:
- lib/new_relic/control/frameworks/rails3.rb
Instance Attribute Summary
Attributes inherited from NewRelic::Control
Attributes included from LoggingMethods
Instance Method Summary collapse
- #env ⇒ Object
- #log!(msg, level = :info) ⇒ Object
- #logger ⇒ Object
- #root ⇒ Object
- #to_stdout(msg) ⇒ Object
- #vendor_root ⇒ Object
- #version ⇒ Object
Methods inherited from Rails
#init_config, #install_developer_mode, #install_episodes, #rails_version
Methods inherited from NewRelic::Control
#agent_enabled?, #app, #init_plugin, #start_agent, #to_s
Methods included from ClassMethods
#instance, #new_instance, #newrelic_root
Methods included from Instrumentation
#_delayed_instrumentation, #add_instrumentation, #install_instrumentation, #install_shim, #load_instrumentation_files, #load_samplers
Methods included from ServerMethods
#api_server, #convert_to_ip_address, #http_connection, #proxy_server, #server, #server_from_host
Methods included from Configuration
#[], #[]=, #apdex_t, #app_names, #capture_params, #developer_mode?, #dispatcher, #dispatcher_instance_id, #episodes_enabled?, #fetch, #license_key, #merge_defaults, #merge_options, #monitor_mode?, #multi_threaded?, #post_size_limit, #send_data_on_exit, #settings, #sync_startup, #use_ssl?, #use_textmate?, #validate_seed, #validate_token, #verify_certificate?
Methods included from LoggingMethods
#log, #log_file_name, #log_path, #setup_log, #should_log?
Methods included from Profiling
#profiling=, #profiling?, #profiling_available?
Instance Method Details
#env ⇒ Object
7 8 9 |
# File 'lib/new_relic/control/frameworks/rails3.rb', line 7 def env @env ||= ::Rails.env.to_s end |
#log!(msg, level = :info) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/new_relic/control/frameworks/rails3.rb', line 20 def log!(msg, level=:info) return unless should_log? logger.send(level, msg) rescue Exception => e super end |
#logger ⇒ Object
15 16 17 |
# File 'lib/new_relic/control/frameworks/rails3.rb', line 15 def logger ::Rails.logger end |
#root ⇒ Object
11 12 13 |
# File 'lib/new_relic/control/frameworks/rails3.rb', line 11 def root @root ||= Rails.root.to_s end |
#to_stdout(msg) ⇒ Object
27 28 29 30 31 |
# File 'lib/new_relic/control/frameworks/rails3.rb', line 27 def to_stdout(msg) logger.info(msg) rescue super end |
#vendor_root ⇒ Object
33 34 35 |
# File 'lib/new_relic/control/frameworks/rails3.rb', line 33 def vendor_root @vendor_root ||= File.join(root,'vendor','rails') end |
#version ⇒ Object
37 38 39 |
# File 'lib/new_relic/control/frameworks/rails3.rb', line 37 def version @rails_version ||= NewRelic::VersionNumber.new(::Rails::VERSION::STRING) end |