Solution 1:

You have $\gamma(0)=1$ and $\gamma(1)=2$. Now, extend $\gamma$ to a path $\gamma^*\colon[0,2\pi+1]\longrightarrow\Bbb C$ by putting $\gamma(t)=2+2\pi-t$ when $t\in[2\pi,2\pi+1]$. Then $\gamma^*$ is a loop and, by Cauchy's integral formula,$$\oint_{\gamma^*}\frac1z\,\mathrm dz=2\pi i.$$So\begin{align}2\pi i&=\oint_{\gamma^*}\frac1z\,\mathrm dz\\&=\oint_\gamma\frac1z\,\mathrm dz-\int_1^2\frac1z\,\mathrm dz\\&=\oint_\gamma\frac1z\,\mathrm dz-\log(2),\end{align}and therefore$$\oint_\gamma\frac1z\,\mathrm dz=\log(2)+2\pi i.$$

Solution 2:

Let me repeat a "rule of thumb" (which can be explained) that I use in such cases:

Being known that the principal branch of the complex logarithm has a "cut" which is by convention the negative real axis,

Every time you cross this "cut" in the positive (trigonometric) orientation, you pay a "toll" of $+2 \pi i$ like in a highway booth ; whereas you are "refunded" by a $-2 \pi i$ amount if you cross the cut in the reverse (clockwise) orientation.

Here the spiral crosses the cut once in the positive direction (in point $(1+\pi)(-1)$).

Besides, just compute the integral as you would do for a real variable:

$$\int_{\gamma} \dfrac{dz}{z}=\ln(\gamma(2 \pi)-\ln(\gamma(0))=\ln(2)-\ln(1)=\ln(2)$$

Now add this result to the $2 \pi i$ you have "paid" and you get the result:

$$\ln(2)+2 \pi i.$$