When I run
kitchen test
or
kitchen test --log-level info
No logs that I have in my recipe under test ie.
Chef::Log.info("How to make appear in kitchen output?")
are displayed in kitchen's output to console. Anyway to make this happen?
driver: vagrant
provisioner: chef-solo
Thanks,
Update: Martin's answer is no longer true as of version 1.7.0 of Test Kitchen (See pull request #950).
According to the Dynamic Configuration doc, "Since Kitchen 1.7.0 the log level for the provisioner is no longer related to the Kitchen log level."
It gives the following example of setting the log_level
in .kitchen.yml:
provisioner:
name: chef-zero
log_level: <%= ENV['CHEF_LOG_LEVEL'] || auto %>
My tests confirm that:
Chef::Log.debug
calls aren't logged when simply running kitchen converge -l debug
.Chef::Log.debug
calls are logged after setting log_level: debug
in .kitchen.yml.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With