We consider two branches of the logarithm. One has a branch cut along the negative imaginary axis where arguments range from $-\frac{\pi}{2}$ to $\frac{3\pi}{2}$. The other has a branch cut along the positive imaginary axis where arguments range from $\frac{\pi}{2}$ to $\frac{5\pi}{2}$. Thus the two branches agree on the half plane $\operatorname{Re} x <0$. Now consider the following contours :

Integrate $\frac{x^{n-1}}{1+x}$ on both contours, with the appropriate branch of $\log x$ then sum them up. After some simplifications (due to the fact that the two branches of $\log x$ agree on the left half plane) we get
$$ \int_{|x+1|=\delta} \frac{x^{n-1}}{1+x}\,\mathrm dx = \int_{|x|=R}\frac{x^{n-1}}{1+x}\,\mathrm dx - \int_{|x|=\delta} \frac{x^{n-1}}{1+x}\,\mathrm dx + \int_\delta^R \big(1- e^{2\pi i(n-1)}\big)\frac{x^{n-1}}{1+x}\,\mathrm dx$$ In the very last integral, we use the regular branch of the logarithm. Residue theorem says that
$$ \int_{|x+1|=\delta} \frac{x^{n-1}}{1+x}\,\mathrm dx = 2\pi i e^{\pi i(n-1)} $$ The two remaining integrals can be estimated to be roughly $\delta^{n}$ and $R^{n-1}$ respectively (using the triangle inequality). Since $0<n<1$, these remaining integrals vanish as $\delta \to 0$ and $R\to\infty$, and at the end of the day, we have
$$ 2\pi i e^{\pi i(n-1)} = \big(1-e^{2\pi i(n-1)}\big) \int_0^\infty \frac{x^{n-1}}{1+x}\,\mathrm dx $$ Equivalently... $$ \int_0^\infty \frac{x^{n-1}}{1+x}\,\mathrm dx = \frac{\pi}{\sin \pi n} $$