Add additional information in the search debug

Adds information about the number of results returned for the given
search.
This commit is contained in:
Zach Leslie 2015-11-10 21:07:00 +00:00
parent 2eeddf0133
commit da1af3a535

View File

@ -88,7 +88,7 @@ module PuppetX
end_time = Time.now end_time = Time.now
time_delta = sprintf('%.3f', end_time - start_time) time_delta = sprintf('%.3f', end_time - start_time)
Puppet.debug("Searching #{@base} for #{@attributes} using #{@filter} took #{time_delta} seconds") Puppet.debug("Searching #{@base} for #{@attributes} using #{@filter} took #{time_delta} seconds and returned #{entries.length} results")
return entries return entries
rescue Exception => e rescue Exception => e
Puppet.debug('There was an error searching LDAP #{e.message}') Puppet.debug('There was an error searching LDAP #{e.message}')