optimize the logs