Evaluating $\int _0^{\frac{\pi }{2}}x\cot \left(x\right)\ln ^2\left(\cos \left(x\right)\right)\:dx$ I want to evaluate $\displaystyle \int _0^{\frac{\pi }{2}}x\cot \left(x\right)\ln ^2\left(\cos \left(x\right)\right)\:dx$ but it's quite difficult.
I have tried to rewrite the integral as
$$\int _0^{\frac{\pi }{2}}x\cot \left(x\right)\ln ^2\left(\cos \left(x\right)\right)\:dx=\frac{\pi }{2}\int _0^{\frac{\pi }{2}}\tan \left(x\right)\ln ^2\left(\sin \left(x\right)\right)\:dx-\int _0^{\frac{\pi }{2}}x\tan \left(x\right)\ln ^2\left(\sin \left(x\right)\right)\:dx$$
I've also tried to integrate by parts in multiple ways yet I cant go forth with this integral, I also tried using the substitution $t=\tan{\frac{x}{2}}$ but cant get anything to work, I'll appreciate any sort of help.
I also tried using the classical expansion
$$\ln \left(\cos \left(x\right)\right)=-\ln \left(2\right)-\sum _{n=1}^{\infty }\frac{\left(-1\right)^n\cos \left(2nx\right)}{n},\:-\frac{\pi }{2}<x<\frac{\pi }{2}$$
But it only gets worse.

This is not an answer, Cornel's solution mentioned in comment is already quite elegant. Instead I provide some remarks.

Generalizations:
$$\int_0^{\pi/2} x^3 \cot x \log^2(\cos x) \,dx = -3 \pi  \operatorname{Li}_5\left(\frac{1}{2}\right)-3 \pi  \operatorname{Li}_4\left(\frac{1}{2}\right) \log (2)-\frac{3 \pi^3 \zeta (3)}{32}+\frac{141 \pi  \zeta (5)}{64}-\frac{9}{16} \pi  \zeta (3) \log^2(2)-\frac{1}{10} \pi  \log^5(2)+\frac{1}{8} \pi^3 \log^3(2)+\frac{11}{480} \pi^5 \log (2) $$
$$\int_0^{\pi/2} x \cot x \log^4(\cos x) \, dx = -6 \pi  \operatorname{Li}_5\left(\frac{1}{2}\right)-6 \pi  \operatorname{Li}_4\left(\frac{1}{2}\right) \log (2)-\frac{3 \pi ^3 \zeta (3)}{32}+\frac{237 \pi \zeta (5)}{64}-\frac{9}{8} \pi  \zeta (3) \log^2(2)-\frac{1}{10} \pi  \log^5(2)+\frac{1}{4} \pi ^3 \log^3(2)+\frac{19}{480} \pi^5 \log (2)$$
similar evaluations also exist for $\int_0^{\pi/2} x^a \cot x \log^b(\cos x) \log^c(\sin x) \, dx$ with $a$ odd, $b,c$ positive integers  with $a+b+c = 5$.
In OP's question, as well as two examples above, we observe that the results are all "divisible by $\pi$" (each term is multiplied by $\pi$). More generally, when $a$ is odd, $$\int_0^{\pi/2} x^a \cot x \log^b(\cos x) \log^c(\sin x) \, dx = \pi \times (\text{Some alternating Euler sums of weight }a+b+c)$$
When $a$ is even, then $\pi$-factor no longer appears, for example $$\int_0^{\pi /2} x^2 \cot x\ln (\cos x) \, \mathrm{d}x =  - \frac{\pi^4}{720} + \frac{\ln^42}{24} - \frac{\pi^2\ln^22}{6} + \operatorname{Li}_4\left(\frac{1}{2}\right)$$
