Logging while drilling