Comments (3)
The code to get both logs going to the same place is pretty gnarly, and I don't know the windows stuff well enough to debug this... any idea on the fix?
from chef-utils.
@natewalck Have you tried setting windows_subshell
to false
? The branch of code that writes to console and the log file is not hit unless this value is false:
https://github.com/facebook/chef-utils/blob/master/chefctl/src/chefctl.rb#L1017-L1038
FWIW I was able to see logs in both console and the app created a directory appropriately with this config:
PS> cat $env:temp\chefctl-test\chefctl-config.rb
## THIS FILE IS MANAGED BY CHEF
### LOCAL CHANGES WILL BE OVERRIDDEN
log_dir 'C:\Users\svmastersamurai\AppData\Local\Temp\chefctl-test\outputs'
lock_file "C:/chef/chefctl.lock"
default_chef_options ["--fatal-windows-admin-check"]
chef_client "C:/opscode/chef/bin/chef-client.bat"
lock_time 1800
max_retries 1
windows_subshell false
PS> C:\opscode\chef\embedded\bin\ruby.exe C:\Users\svmastersamurai\github\chef-utils\chefctl\src\chefctl.rb --config $env:temp\chefctl-test\chefctl-config.rb -i
PS> dir $env:temp\chefctl-test\outputs
Directory: C:\Users\svmastersamurai\AppData\Local\Temp\chefctl-test\outputs
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 6/5/2019 2:45 PM 160361 chef.20190605.1444.1559771097.out
-a---l 6/5/2019 2:44 PM 0 chef.cur.out
-a---l 6/5/2019 2:45 PM 0 chef.last.out
PS> cat $env:temp\chefctl-test\outputs\chef.cur.out -first 10
INFO: Registering FB::CpeinfoReport as a handler for types: report, exception
INFO: Registering FB::TableauReport as a handler for types: report
INFO: Registering FB::ChefRunsReport as a handler for types: report, exception
INFO: Registering FB::FbagentReport as a handler for types: report, exception
INFO: Running on
[2019-06-05T14:45:05-07:00] INFO: *** Chef 14.12.9 ***
[2019-06-05T14:45:05-07:00] INFO: Platform: x64-mingw32
[2019-06-05T14:45:05-07:00] INFO: Chef-client pid: 15864
...
from chef-utils.
This issue can be closed; this issue was caused by plugin_path 'C:/chef/chefctl_hooks.rb'
in chefctl-config.rb
. More specifically, the function def pre_start
was altering Chefctl::Config.path
which should be set to nil when windows_subsystem
is set to false.
from chef-utils.
Related Issues (13)
- postgres "chef" user does not exist in defualt open source chef HOT 4
- Grocery-delivery - Missing methods? HOT 3
- Doesn't seem to detect changes/additions to cookbooks via git. HOT 2
- typo grocery-delivery.rb constant name results in failure to log if repourl is missing on initial checkout
- folsom-stats doesn't work with Chef Server Core 12 HOT 1
- chef_server_stats doesn't collapse folsom_stats into useful key/vals
- We disable v6 SLAAC in fb_sysctl
- chefctl-config.rb or chefctl_config.rb? HOT 5
- chefctl on Chef 16 on macos does not result in colored output HOT 6
- Swap-out "blacklist" verbiage in `chefctl` HOT 1
- add rspec to CI workflow for chefctl.rb
- chefctl on windows: retry lock on permission denied
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chef-utils.