Add a transform for logging nearest-neighbor data.