Chef Recipe Log Output
The log of the chef client run.
Chef recipe log output. Josh nankin nov 19 13 at 23 44. When running chef manually either using chef client or via test kitchen s kitchen converge command you are watching output go by on the console. Knife ssh mynode sudo chef client l info manual list ssh user myuser vv. I m running chef solo 11 8 0 and i get no output using log level debug using an echo in a bash script.
Use vv for much more verbose outputs. Nvm it was because i was running chef solo through vagrant josh nankin nov 19 13 at 23 46 joshnankin how did you get vagrant to output the echo stuff. Set for more verbose outputs. Run vagrant ssh t which means it passes t to ssh command so that there s a tty for the ssh session.
Stack overflow for teams is a private secure spot for you and your coworkers to find and share information. Use vvv for maximum verbosity which may provide more information than is actually helpful. Chef log will print log entries to the default logger that is configured for the machine on which chef infra client is running. Add a comment 15.
To create a log entry that is built into the resource collection use the log resource instead of chef log the following log levels are supported. To change chef client run log level the parameter is l info or l debug for its command call. I try to use logging when. Pkyeck feb 24 15 at 10 10.
When the chef recipes are executed all cookbooks are stored on the node. You can examine the code to make sure your latest changes are reflected on the machine. The output of the chef cookbook execution is in the chef log or chef client log file. Puts this is normal ruby code inside a recipe file and in a client run you will see that output in the compile phase.
Chef logs are one of your key troubleshooting resources especially for debugging recipes. Use the verbose logging that is built into chef infra client l level log level level. Plugins do not always support verbose logging. In your command line it would give info level debug is really verbose and you re loggin at info level in your recipe.
Run chef solo to manually run chef then you will get output on stdout.