Method: Puppet::Util::Logging#debug
- Defined in:
- lib/puppet/util/logging.rb
#debug(*args) ⇒ Object
Output a debug log message if debugging is on (but only then) If the output is anything except a static string, give the debug a block - it will be called with all other arguments, and is expected to return the single string result.
Use a block at all times for increased performance.
34 35 36 37 38 39 40 41 42 |
# File 'lib/puppet/util/logging.rb', line 34 def debug(*args) return nil unless Puppet::Util::Log.level == :debug if block_given? send_log(:debug, yield(*args)) else send_log(:debug, args.join(" ")) end end |