简体   繁体   中英

How to debug a Ohai plugin?

What is the best way to debug an Ohai plugin on chef. 'ohai' command gets the data for all the plugins. Is there a command to debug a single Ohai plugin?

You can run just your plugin via ohai $pluginname on the command line. You can also use -l debug to turn up the logging level. From inside your code, use Ohai::Log.debug('your message') .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM