How to show that a $\log_2(x)$ is a recursive function?
Once you have proved that $|x-2^y|=0$ is a decidable predicate, the function
$$\log_2(x) \equiv \mu y(|x-2^y| = 0)$$
should match the description of the function given and proves that it is recursive.

Edit:
To show that $|x-2^y|=0$ is decidable, show that $\overline{\text{sg}}(|x-2^y|)$ is recursive, which requires you to show that $|x-z|$, $2^y$, and $1 - \text{sg}(z)$ are recursive, then use substitution. 

$|x-z|$ can be defined as $(x-z) + (z-x)$ where cut-off substraction is used in the latter and you can use $x^y$ is a primitive recursive function to show that $2^y$ is recursive. $\text{sg}(z)$ is computable by noting that $\text{sg}(0)=0$ and $\text{sg}(z+1) = 1$.