Module: GrayLogger

Defined in:
lib/gray_logger/rails_modules.rb,
lib/gray_logger.rb,
lib/gray_logger/proxy.rb,
lib/gray_logger/bucket.rb,
lib/gray_logger/logger.rb,
lib/gray_logger/message.rb,
lib/gray_logger/railtie.rb,
lib/gray_logger/support.rb,
lib/gray_logger/configuration.rb,
lib/gray_logger/helper_methods.rb

Overview

to use this you need to call this in a Rails initializer.

ActionController::Base.send(:include, GrayLogger::RailsModules::ActionControllerCatcher)

Defined Under Namespace

Modules: HelperMethods, RailsModules, Support Classes: Bucket, Configuration, Logger, Message, Proxy, Railtie

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



20
21
22
# File 'lib/gray_logger.rb', line 20

def configuration
  @configuration
end

Class Method Details

.configure(config) {|configuration| ... } ⇒ Object

GrayLogger.configure(=> ‘127.0.0.1’) do |config|

config.port = "11200"

end

Yields:



26
27
28
29
# File 'lib/gray_logger.rb', line 26

def self.configure(config)
  self.configuration = ::GrayLogger::Configuration.new(config)
  yield(configuration) if block_given?
end

.configured?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/gray_logger.rb', line 31

def self.configured?
  !self.configuration.nil?
end

.proxyObject



66
67
68
# File 'lib/gray_logger/proxy.rb', line 66

def self.proxy
  @proxy ||= ::GrayLogger::Proxy.new
end

.proxy=(proxy) ⇒ Object



62
63
64
# File 'lib/gray_logger/proxy.rb', line 62

def self.proxy= proxy
  @proxy = proxy
end