Chef-Client 12.4.1 Windows Service - Change from default log location


#1

Were currently switching to enabling the windows chef-client service.
Our test are showing that the chef 12.4.1 windows service ignores the log_location directive in the client.rb file.

Docs say:

After the chef-client is configured to run as a service, the default file path is: c:\chef\chef-client.log.

Docs don’t say:

Where and how to change it from the default.

Wade Peacock
Cloud System Eng - Senior System Engineer/Automation | Vision Critical
direct +1.604.629.9358 mobile +1.604.363.8137
web visioncritical.comhttp://www.visioncritical.com/ | @VisionCritical on Twitterhttps://twitter.com/visioncritical | Visit Vision Critical on LinkedInhttp://www.linkedin.com/company/vision-critical

New York | London | Hong Kong | Vancouver | Paris | San Francisco | Sydney | Tokyo | Toronto | Cologne | Minneapolis | Chicago | Ottawa | Detroit
Click here to watch our clients share their Vision Critical successes: www.visioncritical.com/client-storieshttp://www.visioncritical.com/client-stories


#2

Hi Wade,

The docshttps://docs.chef.io/install_windows.html#run-as-a-service refer to the use of chef-service-manager to install the service on Windows. The options for this utility show you can use the option -L to set the log location:

[cid:image001.png@01D0D4EE.9A057BE0]

[cid:image003.png@01D0D4F0.BA1AEA30]

[cid:image002.png@01D0D4F1.FA065430]

In fact, the default file path on Windows appears to be c:\chef\client.log so the docs are out of date there too. From the above information you could probably work out how best to self-configure the machine in a managed way using the windows_servicehttps://docs.chef.io/resource_windows_service.html resource.

Stuart

From: Wade Peacock [mailto:Wade.Peacock@visioncritical.com]
Sent: 12 August 2015 00:28
To: chef@lists.opscode.com
Subject: [chef] Chef-Client 12.4.1 Windows Service - Change from default log location

Were currently switching to enabling the windows chef-client service.
Our test are showing that the chef 12.4.1 windows service ignores the log_location directive in the client.rb file.

Docs say:

After the chef-client is configured to run as a service, the default file path is: c:\chef\chef-client.log.

Docs don’t say:

Where and how to change it from the default.

Wade Peacock
Cloud System Eng - Senior System Engineer/Automation | Vision Critical
direct +1.604.629.9358 mobile +1.604.363.8137
web visioncritical.comhttp://www.visioncritical.com/ | @VisionCritical on Twitterhttps://twitter.com/visioncritical | Visit Vision Critical on LinkedInhttp://www.linkedin.com/company/vision-critical

New York | London | Hong Kong | Vancouver | Paris | San Francisco | Sydney | Tokyo | Toronto | Cologne | Minneapolis | Chicago | Ottawa | Detroit

Click here to watch our clients share their Vision Critical successes: www.visioncritical.com/client-storieshttp://www.visioncritical.com/client-stories