update the log cleaning table

Update to use write adapter to truncate table
Move the logic to the resource model