From 932291037d0d5534e4b682aa4d11ab118fcef29e Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Thu, 4 Apr 2019 11:53:56 +1100 Subject: [PATCH] feat: change pact rendering log message from warn to info --- lib/pact_broker/api/renderers/html_pact_renderer.rb | 3 +-- spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/pact_broker/api/renderers/html_pact_renderer.rb b/lib/pact_broker/api/renderers/html_pact_renderer.rb index dbe1f3e42..2f6560474 100644 --- a/lib/pact_broker/api/renderers/html_pact_renderer.rb +++ b/lib/pact_broker/api/renderers/html_pact_renderer.rb @@ -159,8 +159,7 @@ def html def consumer_contract Pact::ConsumerContract.from_json(@json_content) rescue => e - logger.warn "#{e.class} #{e.message} #{e.backtrace.join("\n")}" - logger.warn "Could not parse the following content to a Pact, showing raw content instead: #{@json_content}" + logger.info "Could not parse the following content to a Pact due to #{e.class} #{e.message}, showing raw content instead: #{@json_content}" raise NotAPactError end diff --git a/spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb b/spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb index 611a02465..cbff5da6c 100644 --- a/spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb +++ b/spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb @@ -94,8 +94,7 @@ module Renderers end it "logs a warning" do - allow(logger).to receive(:warn).with(/Error/) - expect(logger).to receive(:warn).with(/Could not parse/) + expect(logger).to receive(:info).with(/Could not parse.*Error/) subject end end