Add all log id to database