If $\gamma$ is a path from $0$ to $1$, what do we know about $\displaystyle\int_\gamma\frac{1}{z\pm i}dz$? Let $\gamma$ denote a path from $0$ to $1$ which doesn't cross $\pm i$. What can we say about $$\int_\gamma\frac{1}{z\pm i}dz$$
 A: I am doing the $+$ case only, leaving the other as an exercise.
The antiderivative of $1/(z+ i)$ is $\ln(z+ i)$, so in all cases, you can express the answer as $\ln(1+ i)-\ln(i)$. However, the logarithm is multivalued, so this is not the whole story. To be precise, $\ln w=\ln\lvert w\rvert+i\arg w$, where the $\ln$ on the right is the ordinary logarithm as you know it from real analysis. The ambiguity is in the argument $\arg w$, which is the angle from the positive real axis to $w$. It is unique only up to an additive whole multiple of $2\pi$.
Picking one value for the argument corresponds to picking a branch of the logarithm.  You have to pick a branch varying continuously along the integration path. For real $x$, picking $\arg(x+i)\in(0,\pi)$ will do, and you will find that for the path $\gamma_0$ going along the real axis from $0$ to $1$, you get
$$\int_{\gamma_0}\frac{dz}{z+i}=\ln(1+i)-\ln(i)=\ln(\sqrt2)+\tfrac14\pi i-\tfrac12\pi i=\ln(\sqrt2)-\tfrac14\pi i.$$
For a more general path $\gamma$ from $0$ to $1$, the easiest way to proceed is to consider the closed path $\tilde\gamma$, which follows $\gamma$, then $\gamma_0$ backwards back to the origin. Then $$\int_\gamma\frac{dz}{z+i}=\int_{\tilde\gamma}\frac{dz}{z+i}-\int_{\gamma_0}\frac{dz}{z+i}=\int_{\tilde\gamma}\frac{dz}{z+i}+\ln(\sqrt2)-\tfrac14\pi i,$$
and it remains to find the value of the integral around $\tilde\gamma$.
But that will be $2\pi i$ times the number of times $\tilde\gamma$ winds about $-i$ in the positive direction, by standard residue calculus.
