move loggly stuff to loggly.py