Log distance metric.