Fix $w=re^{i\theta}$ with $r>0$ and $\theta \in \mathbb R.$ Let $\gamma$ be a contour with initial point $1$ and terminal point $w$ such that $\{0 \} \notin \{\gamma \}$. Show that there is an integer $k$ with $$\int_{\gamma} z^{-1}\ dz = \log r + i \theta + 2 \pi i k.$$
I don't find any clue to proceed. If $\{\gamma \}$ is in $\mathbb C \setminus [0,\infty)$ then I can solve it since in this region principal branch of logarithm is analytic and hence it can be treated as a primitive of $z^{-1}$. But if $\{\gamma \}$ lies at some points on non-positive real axis then it becomes difficult for me to tackle.
Please give me some suggestion for solving this problem.
Thank you in advance.