Integrating $\int_\Gamma1/z \, dz$ Through a “Branch Cut”

In my complex analysis book, there is an example where I am asked to compute $\int_\Gamma1/z \, dz$ for two cases: in both of them, $\Gamma$ is a curve going from $-i$ to $i$ in the complex plane. However, in the first case, $\Gamma$ lies in both the first and fourth quadrants, crossing the positive real axis. Let us call it $\Gamma_1$. In the second case, $\Gamma$ lies in both the second and third quadrants, crossing the negative real axis. Let us call it $\Gamma_2$.

Computing

$$\int_{\Gamma_1}\frac{dz}{z}=\log z|_{-i}^i =\pi i$$

is simple enough. However, computing

$$\int_{\Gamma_2}\frac{dz}{z}$$

requires that I make some changes due to a "branch cut" issue with the $\log$ function. The book goes off to explain that, in this case, I have to use $\log|z|+i\arg z$.

I am very confused: where did that come from? Thanks in advance for your help!

-
You can just choose a different logarithm and put the branch cut somewhere else. OR you could just calculate $\int_{\Gamma_1-\Gamma_2} dz/z$. – tomasz Jun 25 '12 at 17:05

As you don't give the actual paths I assume any path from $\,-i\,$ to $\,i\,$ passing through quadrants $\,II-III\,$ is fine, so let us take the path $$\gamma:=\left\{z\in\Bbb C\;:\;|z|=1\,,\,-\frac{\pi}{2}\leq\arg z\leq\frac{\pi}{2}\right\}$$ and thus on this path we have that $$z=e^{it}\,,\,-\frac{\pi}{2}\leq t \leq\frac{\pi}{2}\Longrightarrow dz=ie^{it}dt$$ so that $$\int_\gamma\frac{dz}{z}=i\int_{-\pi/2}^{\pi/2}dt=\pi i$$ and you don't need to mess with any branch cuts of anything at all.