Evaluate $f(z)=\int_0^1 \frac{dt}{t-z}$ where $z\in \mathbb{C}-[0,1]$. 
Evaluate $\displaystyle f(z)=\int_0^1 \frac{dt}{t-z}$ where $z\in \mathbb{C}-[0,1]$. Here, $0\leq t \leq 1$.

My Try:
Can we use the same integration rules here as in real integration? I mean does $$ f(z)=\int_0^1 \frac{dt}{t-z}=\left[\ln|t-z|\vphantom{\frac11}\right]_0^1\text{ ?}$$
 A: One simple mistake is you have $\ln|t-z|$ where you must have intended $\ln|t|-\ln|z|$.
Trigger warning: If the phrase "multiple-valued function" causes you pain, then stop reading before this present sentence.
Notice that if $z=x+iy$ and $x$ and $y$ are real then
$$
e^z = e^x e^{iy} = e^x (\cos y+ i\sin y)
$$
and, since the function $y\mapsto \cos y + i\sin y$ is periodic (with period $2\pi$), the function $z\mapsto e^z$ is not one-to-one.  Notice that $e^{x+iy} = e^{x+iy+2\pi in}$, since $e^{2\pi in}=1$.  Consequently the inverse of $z\mapsto e^z$ is a multiple-valued function
$$
\operatorname{Log}(w) = \operatorname{Log}(e^{x+iy}) = x + iy +2\pi in
$$
for $n\in\mathbb Z$.
So
$$
\int\limits_{\begin{smallmatrix} \text{some path} \\ \text{from $a$ to $b$} \end{smallmatrix}} \frac{dz} z = (\text{one of the values of }\operatorname{Log}b) - (\text{one of the values of }\operatorname{Log}a).
$$
Which one of the values it is depends on which path from $a$ to $b$ it is.  Specifically in the expression $x+iy + 2\pi in$, the value of $n$ increases by $1$ every time the path winds around $0$ in a counterclockwise direction.  Picture $t$ moving along a straight line from $0$ to $1$, and let's suppose for the moment that $z=(1+i)/2$.  Then $t-z$ starts as $-(1+i)/2$ and ends up as $(1-i)/2$, and the line from $z$ to $t$ changes directions by going from southwest to southeast, rotating $90^\circ$ counterclockwise, i.e. $\pi/2$ radians counterclockwise.  Hence the imaginary part of the integral is $i \pi/2$.  The two real parts begin subtracted are equal since $|-(1+i)/2| = |(1-i)/2|$, so the integral is $i\pi/2$.
If you want to do it by methods resembling the technical stuff you learn in first-year calculus, you can write:
\begin{align}
& \int_0^1 \frac{dt}{t-z} = \int_0^1 \frac{dt}{t-x-iy} = \int_0^1 \frac{(t-x+iy)\,dt}{(t-x)^2+y^2} \\[10pt]
= {} & \int_0^1 \frac{(t-x)\,dt}{(t-x)^2+y^2} + i \int_0^1 \frac{y\,dt}{(t-x)^2+y^2} \\[10pt]
= {} & \int_{x^2+y^2}^{(x-1)^2+y^2} \frac{du/2}{u} + i \int_0^1 \frac{dt/y}{\left( \frac{t-x} y \right)^2+1} = \int_{x^2+y^2}^{(x-1)^2+y^2} \frac{du/2}{u} + i \int_{-x/y}^{(1-x)/y} \frac {dv}{v^2+1} \\[10pt]
= {} & \frac 1 2 \log \frac{(x-1)^2+y^2} {x^2+y^2} + i \left( \arctan\frac{1-x} y - \arctan \frac{-x} y \right) \\[10pt]
= {} & \frac 1 2 \log \frac{(x-1)^2+y^2} {x^2+y^2} + i \arctan \frac{y}{y^2+x^2-x}.
\end{align}
This is a function of $x$ and $y$, and maybe after that we'd want to figure out whether we write it as a function of $z=x+iy$.
