When the question is "how many digits are in a number?", `log` is where my mind goes. The other would be fine also.