lib/semantic_logger/appender/rabbitmq.rb in semantic_logger-4.6.1 vs lib/semantic_logger/appender/rabbitmq.rb in semantic_logger-4.7.0
- old
+ new
@@ -1,9 +1,9 @@
begin
- require 'bunny'
+ require "bunny"
rescue LoadError
- raise LoadError.new('Gem bunny is required for logging to RabbitMQ. Please add the gem "bunny" to your Gemfile.')
+ raise LoadError, 'Gem bunny is required for logging to RabbitMQ. Please add the gem "bunny" to your Gemfile.'
end
# Forward all log messages to RabbitMQ.
#
# Example:
@@ -12,11 +12,11 @@
# appender: :rabbitmq,
#
# # Name of the queue in RabbitMQ where to publish the logs. This queue will be bound to "amqp.direct" exchange.
# queue: 'semantic_logger',
#
-# # This host will be used for RabbitMQ connection.
+# # This host will be used for RabbitMQ connection.
# # NOTE this is different than :host option which is used by the logger directly.
# rabbitmq_host: '127.0.0.1',
#
# # RabbitMQ credentials
# username: 'my-username',
@@ -61,11 +61,11 @@
# Default: SemanticLogger.application
#
# RabbitMQ Parameters:
#
# rabbitmq_host: [String]
- # Host for AMQP connection. in Bunny this is called :host but here it has
+ # Host for AMQP connection. in Bunny this is called :host but here it has
# been remapped to avoid conflicting with SemanticLogger's :host param.
# Default: localhost
#
# username: [String]
# Username for AMQP connection
@@ -74,10 +74,10 @@
# password: [String]
# Password for AMQP connection
# Default: nil
#
# more parameters supported by Bunny: http://rubybunny.info/articles/connecting.html
- def initialize(queue_name: 'semantic_logger', rabbitmq_host: nil, metrics: false, **args, &block)
+ def initialize(queue_name: "semantic_logger", rabbitmq_host: nil, metrics: false, **args, &block)
@queue_name = queue_name
@rabbitmq_args = args.dup
@rabbitmq_args[:host] = rabbitmq_host
@rabbitmq_args[:logger] = logger