You rock! Thanks for figuring that out. I've also added some code to memoize that call which combined with this optimized query is going to really improve the performance of logger.