whitelist.py: Move logging into its own function.