Ensure to call end method for logentries.