The special function $P(s)=\int^\infty_0 \frac{\ln(x)dx}{1+x^s}$ 
Evaluate the integral
$$P(s)=\int^\infty_0 \frac{\ln(x) \,dx}{1+x^s}$$

I tried integration by parts, using $u=\ln(x),du=\frac{x}{dx},v=\frac{1}{1+x^s}$, but I did not manage to get anything.
I thought about using a power series, but I did not find one that converges on the entire domain.
Using the substitution $u=\ln(x),du=\frac{dx}{x}$ we get $$\int^\infty_{-\infty} \frac{ue^{-u}}{1+e^{su}} ,$$
which doesn't seem useful either.
The previous similar question Integral of $\int^{\infty}_0 \frac{x^n}{x^s+1}dx$ gives
$$\int^\infty_0 \frac{x^n \,dx}{1+x^s}=\frac{\Gamma(\frac{1}{s})\Gamma\left(1-\frac{1}{s}\right)}{s(n+1)} .$$
Another possibly relevant question is Integral of $\int^{\infty}_0 \frac{e^{-x}}{x^s+1}\,dx$.

The $p$-test implies that this integral diverges for $s \leq 1$, so we assume that $s > 1$.
Hint This integral is a standard application of the Residue Theorem. In this case, we can take the contours $\Gamma_R$ to be the boundaries of the sectors, centered at the origin, of radius $R$ and central angle $\frac{2 \pi}{s}$. (A convenient choice is to take one boundary line segment along the positive real axis and the other along the ray through $e^{2 \pi i / s}$.) Then, the contour contains a single pole, at $e^{\pi i / s}$. Proceeding as usual by rewriting the contour integral as a sum of three integrals, taking the limit as $R \to \infty$ (which eliminates one of the integrals), rearranging, and taking real and imaginary parts gives values both of the given integral,
$$\int_0^\infty \frac{\log x \,dx}{1 + x^s} ,$$
and, as a welcome bonus, the related integral,
$$\int_0^\infty \frac{\,dx}{1 + x^s} .$$

Carrying out the above procedure gives that the relevant residue is $$\operatorname{Res}\left(\frac{\log z}{1 + z^s}, z = e^{\pi i / s}\right) = -\frac{\pi}{s^2} \exp \left(\frac{s + 2}{2 s} \pi i\right)$$ and then that the integral has value $$\int_0^\infty \frac{\log x \,dx}{1 + x^s} = -\frac{\pi^2}{s^2} \cot \frac{\pi}{s} \csc \frac{\pi}{s} .$$

The above technique is essentially robjohn's approach in his answer to this question, which treats the special case $s = 3$. Ron Gordon's approach there, that is, using instead a keyhole contour, applies at least in the special case that $s$ is an integer (necessarily $\geq 2$). Marko Riedel's approach there is similar in spirit to J.G.'s answer to this question.
Remark This integral takes on special values where $\frac{\pi}{s}$ does, including at various rational numbers with small numerator and denominator. In particular for $s = 2$ the integral vanishes, which can be shown using a slick but easier argument.
