Code from my Dreamforce '13 Loggly presentation