How to evaluate the integral $\int_{0}^{\infty} \frac{\log x}{x^p (x-1)}\, dx$? 
How to evaluate the integral 
  $$
I_p=\int_{0}^{\infty} \frac{\log x}{x^p (x-1)}\, dx\,?$$

Attempt:
My first idea was to find the area of convergence, which gives me $p \in (0,1)$. Now let's consider the function $f(z) = \frac{\log^2 z}{z^p (z-1)}$. Then we can use Cauchy theorem and residuals.
But I'm stuck here. Because there is no term to describe $I_1$. Any ideas?
 A: We can take from here the following representation of the digamma function:
$$\psi(s+1)=-\gamma+\int_0^1 \frac{1-x^s}{1-x}dx\Rightarrow \psi_1(s)=\int_0^1 \frac{x^{s-1}\ln x}{x-1}dx$$
Now we are just one step away to solve it by splitting the integral into two pieces because we have:
$$\int_1^\infty \frac{\ln x}{x^p(x-1)}dx\overset{\large x=\frac{1}{t}}=\int_0^1 \frac{t^{p-1}\ln t}{t-1}dt$$

$$\int_0^\infty \frac{\ln x}{x^p(x-1)}dx=\int_0^1 \frac{x^{-p}\ln x}{x-1}dx+\int_0^1\frac{x^{p-1}\ln x}{x-1}dx=\psi_1(1-p)+\psi_1(p)=\boxed{\frac{\pi^2}{\sin^2 (\pi p)}}$$
Above follows by the the trigamma's reflection formula.
A: Well use $$\Re s>0\implies \int_0^\infty\frac{ue^{-su}}{1-e^{-u}}du=\sum_{n\ge 0}\frac{1}{(n+s)^2}.$$With the substitution $u=\ln x$ followed by the identity $\int_{\Bbb R}g(u)du=\int_0^\infty [g(u)+g(-u)]du$, $$I_1=\int_0^\infty\frac{u (e^{-pu}+e^{-(1-p)u})}{1-e^{-u}}du=\sum_{n\ge 0}\left(\frac{1}{(n+1-p)^2}+\frac{1}{(n+p)^2}\right).$$
This is evaluated here as $\pi^2\csc^2\pi p.$
A: The OP stated at the end of the posted question

Now let's consider the function $f(z) = \frac{\log^2 z}{z^p (z-1)}$. Then we can use Cauchy theorem and residuals.

Rather than analyze a contour integral of $f(z)=\frac{\log^2 z}{z^p (z-1)}$, we analyze the integral
$$I(p)=\oint_C \frac{\log(z)}{z^p(z-1)}\,dz$$
where $C$ is the classical keyhole contour where the branch cut for $\log(z)$ is take along the positive real axis and $\arg(z)\in [0,2\pi)$.  Inasmuch as $\frac{\log(z)}{z^p(z-1)}$ is analytic in and on $C$, Cauchy's Integral Theorem guarantees that 
$$\begin{align}
0&=\oint_C \frac{\log(z)}{z^p(z-1)}\,dz\\\\
&=\int_\epsilon^R \frac{\log(x)}{x^p(x-1)}\,dx+\underbrace{\int_0^{2\pi }\frac{\log(Re^{i\phi})}{R^pe^{ip\phi}(Re^{i\phi}-1)}\,iRe^{i\phi}\,d\phi}_{\to 0\,\,\text{as}\,\,R\to \infty}+\int_R^{1+\nu}\frac{\log(x)+i2\pi}{x^pe^{i2\pi p}(x-1)}\,dx\\\\
&+\underbrace{\int_{2\pi}^\pi \frac{\log(1+\nu e^{i\phi})}{(1+\nu e^{i\phi})^p\nu e^{i\phi}}\,i\nu e^{i\phi}\,d\phi}_{\to -i\pi (i2\pi )e^{-i2\pi p}\,\,\text{as}\,\,\nu\to0}+\int_{1-\nu}^\epsilon \frac{\log(x)+i2\pi}{x^pe^{i2\pi p}(x-1)}\,dx+\underbrace{\int_{2\pi}^0 \frac{\log(\epsilon e^{i\phi})}{(\epsilon e^{i\phi})^p(\epsilon e^{i\phi}-1)}\,i\epsilon e^{i\phi}\,d\phi}_{\to 0\,\,\text{as}\,\,\epsilon\to 0}\tag1
\end{align}$$

Letting $\epsilon\to 0^+$, $R\to \infty$, and $\nu \to 0^+$ in $(1)$, we obtain
$$(1-e^{-i2\pi p})\int_0^\infty \frac{\log(x)}{x^p(x-1)}\,dx=i2\pi e^{-i2\pi p}\,\,\text{PV}\left(\int_0^\infty \frac{1}{x^p(x-1)}\,dx\right)+(i\pi)\left(i2\pi e^{-i2\pi p} \right)\tag2$$
where $\text{PV}\left(\int_0^\infty \frac{1}{x^p(x-1)}\,dx+i\pi\right)$ denotes the Cauchy Principal Value (CPV) integral. 

We can evaluate the CVP integral as follows.
$$\begin{align}
\text{PV}\int_0^\infty \frac{1}{x^p(x-1)}\,dx&=\lim_{\nu\to 0^+}\left(\int_0^{1-\nu}\frac{1}{x^p(x-1)}\,dx+\int_{1+\nu}^\infty\frac{1}{x^p(x-1)}\,dx\right)\\\\
&=\lim_{\nu\to 0^+}\left(-\sum_{n=0}^\infty\int_0^{1-\nu}x^{n-p}\,dx+\sum_{n=0}^\infty\int_{1+\nu}^\infty x^{-n-p-1}\,dx\right)\\\\
&=\sum_{n=0}^\infty \left(\frac1{n+p}-\frac1{n-p+1}\right)\tag3
\end{align}$$
The series on the right-hand side of $(3)$ is the partial fraction representation of $\pi \cot(\pi p)$ for $p\in (0,1)$ (SEE HERE).

Substituting $(3)$ into $(2)$, dividing both sides by $(1-e^{-i2\pi p})$, we find 
$$\int_0^\infty \frac{\log(x)}{x^p(x-1)}\,dx=\frac{\pi^2}{\sin^2(\pi p)}$$
A: Too Long for comment
If $p≥2$ were some natural number, we could write the indefinite integral as,
$$
I = \log x \left[ \log \left( 1-\frac {1}{x} \right) + \sum_{r=2}^p \frac {1}{(r-1)x^{r-1}} \right] - \text {Li}{ }_2 \left( \frac {1}{x} \right) + \sum_{r=2}^p \frac {1}{(r-1)^2x^{r-1}} + C
$$
However, I don't know how this can be related to your problem, as you say $0<p<1$ which seems absurd.
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
$\ds{\bbox[15px,#ffd]{I_{p} \equiv \int_{0}^{\infty}{\ln\pars{x} \over x^{p}\pars{x - 1}}\, \dd x}:\ {\Large ?}}$

Lets consider
$\ds{\int_{\mathcal{C}}{\ln\pars{z} \over x^{p}\pars{z + 1}}\,\dd z}$ where $\ds{\mathcal{C}}$ is a key-hole contour which takes care of the $\ds{\ln\pars{z}}$ and $\ds{z^{p}}$ principal branchs. Namely,
\begin{align}
0 & =
\int_{-\infty}^{0}{\ln\pars{-x} + \ic\pi \over
\pars{-x}^{p}\expo{\ic\pi p}\pars{x + 1 + \ic 0^{+}}}\,\dd x +
\int_{0}^{-\infty}{\ln\pars{-x} - \ic\pi \over
\pars{-x}^{p}\expo{-\ic\pi p}\pars{x + 1 - \ic 0^{+}}}\,\dd x
\\[5mm] & =
-\expo{-\ic\pi p}\int_{0}^{\infty}{\ln\pars{x} + \ic\pi \over
x^{p}\pars{x - 1 - \ic 0^{+}}}\,\dd x +
\expo{\ic\pi p}\int_{0}^{\infty}{\ln\pars{x} - \ic\pi \over
x^{p}\pars{x - 1 + \ic 0^{+}}}\,\dd x
\\[5mm] & =
-\expo{-\ic\pi p}\bracks{\mrm{P.V.}\int_{0}^{\infty}{\ln\pars{x} + \ic\pi \over
x^{p}\pars{x - 1}}\,\dd x +
\int_{0}^{\infty}{\ln\pars{x} + \ic\pi \over
x^{p}}\,\ic\pi\,\delta\pars{x - 1}\,\dd x}
\\[2mm] & \,\,\,\,\phantom{-}+
\expo{\ic\pi p}\bracks{\mrm{P.V.}\int_{0}^{\infty}{\ln\pars{x} - \ic\pi \over
x^{p}\pars{x - 1}}\,\dd x -
\int_{0}^{\infty}{\ln\pars{x} - \ic\pi \over
x^{p}}\,\ic\pi\,\delta\pars{x - 1}\,\dd x}
\\[5mm] & =
2\ic\sin\pars{\pi p}\int_{0}^{\infty}
{\ln\pars{x} \over x^{p}\pars{x - 1}}\,\dd x -
2\pi\ic\cos\pars{\pi p}\,\mrm{P.V.}\int_{0}^{\infty}
{\dd x \over x^{p}\pars{x - 1}}
\\[3mm] & -
2\pi^{2}\ic\sin\pars{\pi p}
\end{align}
Then,
\begin{equation}
\bbx{\int_{0}^{\infty}
{\ln\pars{x} \over x^{p}\pars{x - 1}}\,\dd x =
\pi\cot\pars{\pi p}\,\mrm{P.V.}\int_{0}^{\infty}
{\dd x \over x^{p}\pars{x - 1}} + \pi^{2}}\label{1}\tag{1}
\end{equation}

$\ds{\large\mrm{P.V.}\int_{0}^{\infty}
{\dd x \over x^{p}\pars{x - 1}}
\ Evaluation:\ {\Large ?}}$
\begin{align}
\mrm{P.V.}\int_{0}^{\infty}
{\dd x \over x^{p}\pars{x - 1}} &
\,\,\,\stackrel{\mrm{def.}}{=}\,\,\,
\lim_{\epsilon\ \to\ 0^{\large +}}\bracks{%
-\int_{0}^{1 - \epsilon}{x^{-p} \over 1 - x}\,\dd x -
\int_{1 + \epsilon}^{\infty}{x^{-p} \over 1 - x}\,\dd x}
\\[5mm] & =
\lim_{\epsilon\ \to\ 0^{\large +}}\bracks{%
-\int_{0}^{1 - \epsilon}{x^{-p} \over 1 - x}\,\dd x -
\int_{1/\pars{1 + \epsilon}}^{0}{x^{p} \over 1 - 1/x}\,\pars{-\,{\dd x \over x^{2}}}}
\\[5mm] & =
\lim_{\epsilon\ \to\ 0^{\large +}}\bracks{%
-\int_{0}^{1 - \epsilon}{x^{-p} \over 1 - x}\,\dd x +
\int_{0}^{1/\pars{1 + \epsilon}}{x^{p - 1} \over 1 - x}\,\dd x}
\\[5mm] & =
\int_{0}^{1}{1 - x^{-p} \over 1 - x}\,\dd x -
\int_{0}^{1}{1 - x^{p - 1} \over 1 - x}\,\dd x
\\[5mm] & =
\Psi\pars{-p + 1} - \Psi\pars{p} = \pi\cot\pars{\pi p}
\end{align}
I left behind $\ds{\underline{some\ details}}$ !!!. With (\ref{1}):
$$
\int_{0}^{\infty}
{\ln\pars{x} \over x^{p}\pars{x - 1}}\,\dd x =
\pi^{2}\cot^{2}\pars{\pi p} + \pi^{2} =
\bbox[15px,#ffd,border:1px solid navy]{\pi^{2} \over \sin^{2}\pars{\pi p}}
$$
