Principles of Log Calibration and Their Application to Log Accuracy