Note that there are some explanatory texts on larger screens.

plurals
  1. POCucumber / Savon omit or remove logging output
    primarykey
    data
    text
    <p>While running a cucumber test I am getting (in addition to the test results) a lot of debug/log related output in the form:</p> <pre><code>D, [2013-03-06T12:21:38.911829 #49031] DEBUG -- : SOAP request: D, [2013-03-06T12:21:38.911919 #49031] DEBUG -- : Pragma: no-cache, SOAPAction: "", Content-Type: text/xml;charset=UTF-8, Content-Length: 1592 W, [2013-03-06T12:21:38.912360 #49031] WARN -- : HTTPI executes HTTP POST using the httpclient adapter D, [2013-03-06T12:21:39.410335 #49031] DEBUG -- : &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ... </code></pre> <p>Is there a way to turn this output off? I have tried following the instructions in <a href="https://stackoverflow.com/questions/4217783/ruby-savon-gem-change-logging-configuration">this post</a>, and my config_spec.rb file is:</p> <pre><code>require "spec_helper" describe Savon::Config do let(:config) { config = Savon::Config.new config._logger = Savon::Logger.new config.log_level = :error # changing the log level HTTPI.log = false # to total silent the logging. config } describe "#clone" do it "clones the logger" do logger = config.logger clone = config.clone logger.should_not equal(clone.logger) end end it "allows to change the logger" do logger = Logger.new("/dev/null") config.logger = logger config._logger.subject.should equal(logger) end it "allows to change the log level" do Savon::Request.log_level = :info config.log_level = :error config._logger.level.should == :error end it "allows to enable/disable logging" do config.log = false config._logger.should be_a(Savon::NullLogger) config.log = false config._logger.should be_a(Savon::Logger) end end </code></pre> <p>But the logging still showing when I run the cucumber tests.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload