lib/chef/knife/solo_cook.rb in knife-solo-0.7.0.pre vs lib/chef/knife/solo_cook.rb in knife-solo-0.7.0.pre2
- old
+ new
@@ -77,10 +77,15 @@
option :legacy_mode,
:long => '--legacy-mode',
:description => 'Run chef-solo in legacy mode'
+ option :log_level,
+ :short => '-l LEVEL',
+ :long => '--log-level',
+ :description => 'Set the log level for Chef'
+
def run
time('Run') do
if config[:skip_chef_check]
ui.warn '`--skip-chef-check` is deprecated, please use `--no-chef-check`.'
@@ -139,9 +144,17 @@
Chef::Config[:ssl_verify_mode] || :verify_peer
end
def solo_legacy_mode
Chef::Config[:solo_legacy_mode] || false
+ end
+
+ def log_level
+ config_value(:log_level, Chef::Config[:log_level] || :warn).to_sym
+ end
+
+ def enable_reporting
+ config_value(:enable_reporting, true)
end
def expand_path(path)
Pathname.new(path).expand_path
end