Skip to content

Commit

Permalink
set default log level to :warn
Browse files Browse the repository at this point in the history
  • Loading branch information
vangberg committed Feb 16, 2011
1 parent 9fd63ba commit d01591a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/httpi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module HTTPI

REQUEST_METHODS = [:get, :post, :head, :put, :delete]

DEFAULT_LOG_LEVEL = :debug
DEFAULT_LOG_LEVEL = :warn

class << self

Expand Down Expand Up @@ -154,7 +154,7 @@ def logger

# Returns the log level. Defaults to :debug.
def log_level
@log_level ||= :debug
@log_level ||= DEFAULT_LOG_LEVEL
end

# Logs given +messages+.
Expand Down
5 changes: 3 additions & 2 deletions spec/httpi/httpi_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@
end

describe ".log_level" do
it "should default to :debug" do
HTTPI.log_level.should == :debug
it "should default to :warn" do
HTTPI.log_level.should == :warn
end

it "should set the log level to use" do
Expand All @@ -303,6 +303,7 @@

describe ".log" do
it "should log given messages" do
HTTPI.log_level = :debug
HTTPI.logger.expects(:debug).with("Log this")
HTTPI.log "Log", "this"
end
Expand Down

1 comment on commit d01591a

@dbrock
Copy link

@dbrock dbrock commented on d01591a Sep 26, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What’s the purpose of this change? Am I supposed to be getting this message all the time?

WARN -- : HTTPI executes HTTP GET using the httpclient adapter"

Please sign in to comment.