adds batched output for logging