log anomaly in addition to inserting it into the database