/제거 형태로 관련 출력을 로그 :오이/Savon가 생략하거나 로그 출력
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 -- : <?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
...
방법이 있나요 이 출력을 끄려면? 나는 this post의 지침에 따라 시도, 내 config_spec.rb 파일은 다음과 같습니다
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
하지만 오이 테스트를 실행할 때 로깅은 여전히 보여. Savon API에 대한 설명서를보고
당신이 사용하는 Savon의 버전은 무엇? 2.1.0? http://savonrb.com/version2.html#changes – Bala
savon (1.2.0)을 확인 하셨기를 바랍니다. 이 버전을 사용해야합니다 (타사의 종속성입니다) – obaqueiro