teach stats_log how to do dynamic memory allocation
Merge pull request #18 from uber/dynamic_log

teach stats_log how to do dynamic memory allocation