summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan McLellan <btm@opscode.com>2012-06-07 13:13:01 -0700
committerBryan McLellan <btm@opscode.com>2012-06-07 13:13:01 -0700
commitdc2a014305c197af8d15c1fe8a9cccf19b88d0db (patch)
tree89bb0cd588842bc9ade745158f484fb52084d700
parent2f84542c0b0223e2720e3bc9af019d4418bd52c5 (diff)
parentf1ed3c6cedde781690b690f5350f3ca79688adc1 (diff)
downloadmixlib-log-dc2a014305c197af8d15c1fe8a9cccf19b88d0db.tar.gz
Merge branch 'CHEF-3173'
-rw-r--r--lib/mixlib/log.rb2
-rw-r--r--spec/mixlib/log_spec.rb7
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/mixlib/log.rb b/lib/mixlib/log.rb
index 2819d1d..aa477c8 100644
--- a/lib/mixlib/log.rb
+++ b/lib/mixlib/log.rb
@@ -72,7 +72,7 @@ module Mixlib
# get passed directly to Logger.new, so check out the documentation for the standard Logger class
# to understand what to do here.
#
- # If this method is called with no arguments, it will log to STDOUT at the :info level.
+ # If this method is called with no arguments, it will log to STDOUT at the :warn level.
#
# It also configures the Logger instance it creates to use the custom Mixlib::Log::Formatter class.
def init(*opts)
diff --git a/spec/mixlib/log_spec.rb b/spec/mixlib/log_spec.rb
index 00307f2..1a4a33e 100644
--- a/spec/mixlib/log_spec.rb
+++ b/spec/mixlib/log_spec.rb
@@ -137,4 +137,11 @@ describe Mixlib::Log do
Logit.init
end
+ it "should have by default a base log level of warn" do
+ logger_mock = Struct.new(:formatter, :level).new
+ Logger.stub!(:new).and_return(logger_mock)
+ Logit.init
+ Logit.level.should eql(:warn)
+ end
+
end