From 0cea929e152e1ec21de3237100c3d812cfec1eb5 Mon Sep 17 00:00:00 2001 From: Mark Harrison Date: Mon, 20 Jul 2015 11:22:04 -0400 Subject: Add formatter and force-logger/formatter options to chef-apply This change simply copies the formatter, force-logger and force-formatter options across from chef-client/chef-solo to chef-apply. The options are honored without further changes, and this allows you to force doc formatting output with chef-apply when the output isn't a terminal. --- lib/chef/application/apply.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb index e9768b218c..243b441119 100644 --- a/lib/chef/application/apply.rb +++ b/lib/chef/application/apply.rb @@ -49,6 +49,24 @@ class Chef::Application::Apply < Chef::Application :description => "Load attributes from a JSON file or URL", :proc => nil + option :force_logger, + :long => "--force-logger", + :description => "Use logger output instead of formatter output", + :boolean => true, + :default => false + + option :force_formatter, + :long => "--force-formatter", + :description => "Use formatter output instead of logger output", + :boolean => true, + :default => false + + option :formatter, + :short => "-F FORMATTER", + :long => "--format FORMATTER", + :description => "output format to use", + :proc => lambda { |format| Chef::Config.add_formatter(format) } + option :log_level, :short => "-l LEVEL", :long => "--log_level LEVEL", -- cgit v1.2.1