Looks like excessive logging in the loop - 3 separate debug messages if it's found, or 2 otherwise.
I'd at least pull out the "finding value..." log message to before the for loop.
And in the log messages I'd give more context (e.g. saying it's chef, and which entity it's for).