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!