Add Logging into database