add logs in database