Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chef logs with test kitchen

Tags:

chef-infra

I am using test kitchen and has a depandant cookbook that my cook book is using.

The dependant cookbook has a resource which has a log-


Chef::Log.fatal("Fetching the md5 for #{file_name} at #{uri} resulted in an error #{response.code}")

When I converge my cookbook, I don't see this log. What can i do to see this log.

I used below command for converging- kitchen converge -l debug.

like image 237
user6378152 Avatar asked Aug 01 '26 16:08

user6378152


1 Answers

kitchen -l debug used to work but now that only sets the log level for Kitchen, not Chef. You need to add the log level to your kitchen config:

provisioner:
  name: whatever
  log_level: debug
like image 109
coderanger Avatar answered Aug 10 '26 00:08

coderanger