Class: AMQPLogging::Logger

Inherits:
Logger
  • Object
show all
Defined in:
lib/amqp_logging/logger.rb

Constant Summary collapse

DEFAULT_OPTIONS =
{
  :shift_age    => 0,
  :shift_size   => 1048576,
  :host         => "localhost",
  :exchange     => "logging_exchange",
  :queue        => "logging_queue",
  :routing_key  => "logs",
  :exchange_durable     => true,
  :exchange_auto_delete => false,
  :exchange_type        => :topic,
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = DEFAULT_OPTIONS) ⇒ Logger

Returns a new instance of Logger.



17
18
19
20
21
22
# File 'lib/amqp_logging/logger.rb', line 17

def initialize(options=DEFAULT_OPTIONS)
  options = DEFAULT_OPTIONS.merge(options)
  super(nil)
  @logdev = AMQPLogging::LogDevice.new(options)
  @logdev.logger = self
end

Instance Attribute Details

#errbackObject

Returns the value of attribute errback.



15
16
17
# File 'lib/amqp_logging/logger.rb', line 15

def errback
  @errback
end

#extra_attributesObject

Returns the value of attribute extra_attributes.



14
15
16
# File 'lib/amqp_logging/logger.rb', line 14

def extra_attributes
  @extra_attributes
end