Module: AMQPLogging::MetricsAgent::MetricsAgentSupport

Defined in:
lib/amqp_logging/metrics_agent.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



92
93
94
95
96
97
# File 'lib/amqp_logging/metrics_agent.rb', line 92

def self.included(base)
  base.class_eval do
    alias :add_without_proxy :add
    alias :add :add_with_proxy
  end
end

Instance Method Details

#add_with_proxy(severity, message = nil, progname = nil) ⇒ Object



103
104
105
106
# File 'lib/amqp_logging/metrics_agent.rb', line 103

def add_with_proxy(severity, message = nil, progname = nil)
  @agent.add_logline(severity, message, progname, self) unless severity < @level
  add_without_proxy(severity, message, progname)
end

#agentObject



99
100
101
# File 'lib/amqp_logging/metrics_agent.rb', line 99

def agent
  @agent
end