Move logging into create_app