sumit salunke
sumit salunke

Reputation: 125

Want to create a log file of chef-client execution

I want to create a log file of the chef-client execution at /root/logs path. How to add code in recipe file that will create a logs file in above location? Please help me with this.

Upvotes: 4

Views: 8005

Answers (1)

Mrigesh Priyadarshi
Mrigesh Priyadarshi

Reputation: 948

Run the chef client with -L option followed by expected log location.

chef-client -L /root/logs/chef-client.log

https://docs.chef.io/debug.html#chef-client

Upvotes: 8

Related Questions