/** * Send log entries to Loggly */ @Override public void processLogEntries() { if (isDebug()) { addInfo("Process log entries - " + getDebugInfo()); } outputStream.rollCurrentBucketIfNotEmpty(); BlockingDeque<ByteArrayOutputStream> filledBuckets = outputStream.getFilledBuckets(); ByteArrayOutputStream bucket; while ((bucket = filledBuckets.poll()) != null) { try { InputStream in = new ByteArrayInputStream(bucket.toByteArray()); processLogEntries(in); } catch (Exception e) { addWarn("Internal error", e); } outputStream.recycleBucket(bucket); } }