insert into the proper log table