Use edwardk's reflection library for better optimizations in code that uses logging

Ping @ekmett