mimic the logic in the realex ipn
logging