$\int_{-1}^1 \log{z} dz$, where the principal branch of $\log z$ is the negative real axis, and hence $Arg(z) \in (-\pi,\pi]$. \
This is what I did.
\begin{align*} \int_{-1}^1 \log{z} dz &= z\log z - z|_{-1}^1 \\ &= \log(1) - 1 - (-\log(-1) + 1) \\ &= \log(1) + \log(-1) - 2 \\ &= ln|1| + iArg(1) + \ln|-1| + iArg(-1) - 2 \\ &= i\pi - 2 \end{align*}
I used FTC, but I'm not sure if I'm allowed to since the line segment from $-1$ to $1$ goes through the branch cut. So I'm pretty sure my computation does not make theoretical sense. So where have I went wrong?
Fundamental Theorem of Calculus works for a complex function $f$, when there is a function $F$ such that its complex derivative exists and equal to $f$ along the integration path. For the complex derivative to exist, $F$ should be holomorphic in some open set, that includes the path of integration.
You can change the definition of $\log$ by taking $\operatorname{Arg}(z)\in(-\pi+\varepsilon, \pi+\varepsilon]$ for some small $\varepsilon>0$. Then $F(z) = z\log z - z$ will be holomorphic in open sets
$$ \begin{align} &U_1 = \{z \in \mathbb{C} \;| \; \operatorname{Arg}(z) \in (\pi-\varepsilon, \pi+\varepsilon) \text{ and } z\ne 0\}, \\ &U_2 = \{z \in \mathbb{C} \;| \; \operatorname{Arg}(z) \in (-\varepsilon, \varepsilon) \text{ and } z\ne 0\}, \end{align} $$ and its complex derivative will equal to $f(z) = \log z$ within this sets.
You can then calculate $$ \int_{-1}^{0} f(z)dz = -1+i\pi \quad \text{and} \quad \int_{0}^{1} f(z)dz = -1 $$ without any worries.