modified to support log forwarding to loggly