Implement log handler for iOS and OSX