puppetlabs/puppet — pull request #3125 by jantman (2014-09-26 21:30:11+00:00)
Title: log uid and gid for Puppet::Util::Execution.execute if specified as non-default

This might be able to use a little bit of cleanup, I guess it depends on how nicely you want the output formatted. But I was debugging a custom provider that uses Puppet::Util::Execution.execute and seemed to be executing as root instead of the specified user... and found that the debugging output didn't really help me find the problem.