How to find all the solutions to cos$(z)=0$
Logarithms are treacherous. It is safer and easier to note that we are looking at the equation $e^{iz}=-e^{-iz}$. Let $z=a+ib$, where $a$ and $b$ are real. Then the norm of $e^{i(a+ib)}$ is $e^{-b}$, and the norm of $-e^{-iz}$ is $e^{b}$. If $b \ne 0$, the norms don't match.
So $z$ has to be real, and we are in familiar territory.