How to get all chef log into a file?


#1

How can i get all the chef client run log of a node into a txt or any file?


#2

You could use --log_level and --logfile
https://docs.chef.io/ctl_chef_client.html


#3

You can edit the /etc/chef/client.rb and set the line log_location to your desired values. You can use syslog, windows event logger, and simple log files as well.

https://docs.chef.io/config_rb_client.html


#4

I am working on windows . Is their any code you can suggest