In the proof of Argument theorem, it is stated the name comes from the fact that the integral of Logarithmic derivative is proportional to change of argument of function. ie.,
$$\int _{ \gamma} \frac{f'(z)}{f(z)}dz =\int _{ \gamma} \frac{d}{dz} \ln(r(z)e^{i\theta})) dz =\int _{ \gamma} \frac{d}{dz} \ln(r(z)) dz + i \int _{ \gamma} \frac{d}{dz} \theta (z) dz = i \int _{ \gamma} \frac{d}{dz} \theta (z) dz $$
My question is how is
$$\int _{ \gamma} \frac{d}{dz} \ln(r(z)) dz = \int _{ \gamma} \frac{1}{r(z)} d(r(z) = 0?$$
Clearly it has poles whenever $f(z)$ is zero inside $\gamma$ and can't be outright equated to $0$ as its not analytic.
In other words I am asking for the proof of
$\int _{ \gamma} \frac{f'(z)}{f(z)}dz = i \int _{ \gamma} \frac{d}{dz} \theta (z) dz $
Linking to this question.