summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-09-04 15:49:03 -0700
committerTim Smith <tsmith84@gmail.com>2020-09-04 15:49:03 -0700
commit96507624895a549384a5046e0dc309fb064d2f85 (patch)
tree70254ae5de6c3423f5f4e831e766e1535299b01c
parent2bfc9106cfa6a3df12204bd255b5f7007c2f8f30 (diff)
downloadchef-96507624895a549384a5046e0dc309fb064d2f85.tar.gz
Add --logfile to chef-apply commandapply_logging
I needed this for testing and it just sorta seems like something we should support. Yes that means people may be using chef-apply with some sort of init system, but if that's something they wanna do then why not just let them roll with that. This just copies the option from the base.rb file and it works fine for me locally. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/application/apply.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb
index 8d64c48102..83e28880f9 100644
--- a/lib/chef/application/apply.rb
+++ b/lib/chef/application/apply.rb
@@ -77,6 +77,11 @@ class Chef::Application::Apply < Chef::Application
description: "Set the log level (trace, debug, info, warn, error, fatal).",
proc: lambda { |l| l.to_sym }
+ option :log_location_cli,
+ short: "-L LOGLOCATION",
+ long: "--logfile LOGLOCATION",
+ description: "Set the log file location, defaults to STDOUT - recommended for daemonizing."
+
option :always_dump_stacktrace,
long: "--[no-]always-dump-stacktrace",
boolean: true,