Why can I get two different results when calculating $\int \ln(z) \,dz$? When I take as a branch cut $]\!\,-\!\infty,0]$ for the complex logarithm, I get:
$$\int_{\lvert z\rvert<1}\ln(z)\,dz=\int_{-\pi}^{\pi}\ln(e^{i\theta})\,i\theta \,d\theta=-2i\pi$$
whereas, when I take  $[0,+\infty[$ as a branch cut, I get:
$$\int_{\lvert z\rvert<1}\ln(z)dz=\int_{0}^{2\pi}\ln(e^{i\theta})\,i\theta \,d\theta=2i\pi$$
Does the integral of $\ln(z)$ depend on the branch cut we choose?
 A: CORRECTION: I'll detail the computations in both cases setting too $\,z:=e^{i\theta}$.


*

*for the cut $\;]-\infty,0]$ :
\begin{align}
I&:=\int_{\lvert z\rvert=1}\ln(z)\,dz\\
&=\int_{-\pi}^{\pi}\ln(e^{i\theta})\,ie^{i\theta}\,d\theta\\
&=-\int_{-\pi}^{\pi}\theta\,e^{i\theta}\,d\theta,\quad\text{integrating by parts to get :}\\
&=-\left.\frac{\theta\,e^{i\theta}}i\right|_{-\pi}^{\pi}+\int_{-\pi}^{\pi}\frac{e^{i\theta}}i\,d\theta\\
&=-\frac{-\pi-\pi}i+0\\
&=-2i\pi\\
\end{align}

*for the cut $\;[0,\infty[$ :
\begin{align}
I&:=\int_{\lvert z\rvert=1}\ln(z)\,dz\\
&=\int_0^{2\pi}\ln(e^{i\theta})\,ie^{i\theta}\,d\theta\\
&=-\int_0^{2\pi}\theta\,e^{i\theta}\,d\theta,\quad\text{integrating by parts to get :}\\
&=-\left.\frac{\theta\,e^{i\theta}}i\right|_0^{2\pi}+\int_0^{2\pi}\frac{e^{i\theta}}i\,d\theta\\
&=-\frac{2\pi}i+0\\
&=2i\pi\\
\end{align}
In both cases we are adding the contributions for a rotation of total angle $2\pi$ of the complex logarithmic whose imaginary part is presented here (Wikipedia link) .
The offset of the logarithm at the start are different and thus the result.
(my initial version was wrong as explained by next).
A: It depends on the branchcut because then the integrand changes.For contours that aren't closed , you may also need the specific branch (not just the branchcut) .But here in this case, when you choose the branchcut, any continuous branch of the logarithmic function will differ by a multiple of $ 2\pi i$ which doesn't change the integral value for closed contours like the unit circle.
Unless otherwise stated,you take the principal branch.For example in the above case the integral value is $-2\pi i $.
