How to get all chef log into a file?

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

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

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

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