This question relates only to $x \in \mathbb{R}^+$. The function $f(x) = \cos (\log (x))$ is clearly defined on the positive reals, with a monotonic decreasing period $p(x)$ which is defined at the limits of this range by
$$\underset{x\to 0^+}{\text{lim}}p(f(x)) = \infty$$ $$\underset{x\to \infty}{\text{lim}}p(f(x)) = 0$$
$p$ still needs clear definition for any given $0 < x_0 < \infty$. So, let us define $p(x_ 0)$ as the smallest positive real $a$ for which this pair of equations hold:
$$\cos (\log (x_0)) = \cos (a \log (x_0))$$ $$\text{sgn}\left(\frac{\partial \cos \left(\log \left(x_0\right)\right)}{\partial x_0}\right) = \text{sgn}\left(\frac{\partial \cos \left(a \log \left(x_0\right)\right)}{\partial x_0}\right)$$
Is the right approach? And how do I proceed?
I would approach this as follows.
The period of $\cos(x)$ is $2\pi$, everywhere. At a particular $x_0$, what $a$ must you add to $x_0$ so that $\ln(x_0+a)$ is $2\pi$ greater than $\ln(x_0)$? In other words, solve for $a$ in
$$\ln(x_0)+2\pi=\ln(x_0+a)$$
The solution is
$$a=\left(e^{2\pi}-1\right)x_0$$
It would also make sense to me to go backwards and solve $$\ln(x_0)-2\pi=\ln(x_0-a)$$ where the solution is $$a=\left(1-e^{-2\pi}\right)x_0$$
You could take the two solutions and average them somehow. It might make sense to take their geometric mean:
$$a=\left(e^{\pi}-e^{-\pi}\right)x_0$$