ported the logger