Save logs in DB