lib/alephant/broker/component_factory.rb in alephant-broker-3.18.0 vs lib/alephant/broker/component_factory.rb in alephant-broker-3.19.0
- old
+ new
@@ -17,14 +17,22 @@
Component.new(
component_meta,
@load_strategy.load(component_meta)
)
rescue Alephant::Broker::Errors::ContentNotFound => e
- logger.warn "Broker.ComponentFactory.create: Exception raised (ContentNotFound) for #{component_meta.component_key}"
+ logger.error(
+ method: 'Broker.ComponentFactory.create',
+ message: 'Exception raised (ContentNotFound)',
+ component_key: component_meta.component_key
+ )
logger.metric "ContentNotFound"
ErrorComponent.new(component_meta, 404, e)
rescue => e
- logger.warn "Broker.ComponentFactory.create: Exception raised (#{e.message}, #{e.backtrace.join('\n')})"
+ logger.error(
+ method: 'Broker.ComponentFactory.create',
+ message: e.message,
+ backtrace: e.backtrace.join('\n')
+ )
logger.metric "ExceptionRaised"
ErrorComponent.new(component_meta, 500, e)
end
end
end