add logging to db
add logging to db