Add initial logging middleware.
Fix iOS device logging and log about possible downgrades.