Dirty logging to DB