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.
Since your contour $\gamma$ does not contain $0$, then it's implied that a continuous logarithm $\text{Log}$ (and it's corresponding continuous argument $\text{Arg}(z)\in[\varphi,\varphi+2\pi)$ for some $\varphi$), that it's derivable where $\gamma$ is, so given this we can solve your integral:
$$\int_\gamma\frac{dz}{z}=\text{Log}(w)-\text{Log}(1)=\log|re^{i\theta}|+i\text{Arg}(re^{i\theta})-\log|1|-i\text{Arg}(1)=$$ $$=\log r + i(\theta + 2\pi k_1) - i(2\pi k_2)=\log r + i\theta + 2\pi i(k_1-k_2),$$ where $k_1,k_2\in\mathbb Z$ (and depend on what is our continuous argument). We denote $k=k_1+k_2$ and end up with the desired expression: $$\int_\gamma\frac{dz}{z}=\log r + i\theta + 2\pi i k,\quad k\in\mathbb Z$$